Tinker9 Compilation with cc89 and cc90
In June 2022, I was trying to compile Tinker9 with cc89 but failed. Zhi Wang said that nvc++ likely does not support minor cc release. By that time, I was able to compile Tinker9 with cc86 and run Tinker9 in L40 GPUs (cc89) without any problem. Recently, our school has acquired some L40S GPUs. Using Tinker9 compiled with cc86 runs on L40S GPUs but GPU utilization is only around 60%. The performance of Tinker9 in L40S is not as good as in L40 which is very strange.
One possibility is that Tinker9 is needed to compile with cc89 in order to take full advantage of the L40S GPUs.
So, I have tried the newer versions of NVHPC compiler, 23.7, 23.11, 24.1, 24.5. They are able to compile Tinker9 with cc86. But the compilation will fail with cc89 and cc90. With cc90, it is a major release, I would expect that nvc++ should support it.
Here is the error I am getting.
[ 86%] Building CXX object src/acc/CMakeFiles/tinker9_acc.dir/amoeba/empoleewald.cpp.o nvc++-Warning-unknown driver variable assigned on the command line: CUDA_HOME=/usr/local/cuda nvc++-Warning-The flag -ta has been deprecated, please use -acc and -gpu instead.
nvc++-Error-Switch -ta with unknown keyword cc90
In the above error message, nvc++ thinks that cc90 is an unknown keyword.
Is there any way to work around it?
Thanks so much.
In April 2023, @aurbn had described how to do the compilation with cc89.
https://github.com/TinkerTools/tinker9/discussions/121
Basically, 3 lines are commented out in the CMakeLists.txt file in the Tinker9 distribution. With CUDA 12.4 and NVHPC 24.5, Tinker9 is able compiled without any problem. I have tested running it on a node with L40S GPU. The job is able to run in full speed.
Thanks for the update, those instructions (CUDA 12.4, NVHPC 24.5) worked for me as well!