TinkerTools / tinker9

Tinker9: Next Generation of Tinker with GPU Support
Other
48 stars 26 forks source link

Installation issue #237

Closed chem1912 closed 7 months ago

chem1912 commented 10 months ago

Hello! I an trying to did the following to install Tinker9 v1.4.0 on gpu cluster, CentOS Linux 7 is the system. The GCC version is 4.8.5. I run the fellowing: git clone --depth 1 --branch v1.4.0 https://github.com/tinkertools/tinker9 cd tinker9 && mkdir build cd build export PATH=/path_to_cmake/cmake-3.28.0-rc2-linux-x86_64/bin:$PATH module load cuda/10.2 nvhpc/23.1 cmake -DCUDA_DIR=${CUDA_HOME} -DCOMPUTE_CAPABILITY=70 -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/export/home/csming/softwire/tinker9 -DGPU_LANG=cuda -DSTD=11 .. make Which gave this error:

[  1%] Built target tinkerObjCpp
[ 75%] Built target tinkerObjF
[ 75%] Built target tinkerFToCpp
[ 75%] Built target __t9_main_o
[ 81%] Built target tinker9_cu
[ 81%] Built target __t9_symlink
[ 81%] Built target tinker9_f
[ 93%] Built target tinker9_cpp
[ 93%] Building CXX object src/CMakeFiles/tinker9_version.dir/xinfo.cc.o
"/path_to_tinker9/src/xinfo.cc", line 86: error: expected an expression
     );
     ^

1 error detected in the compilation of "/path_to_tinker9/src/xinfo.cc".
make[2]: *** [src/CMakeFiles/tinker9_version.dir/xinfo.cc.o] Error 2
make[1]: *** [src/CMakeFiles/tinker9_version.dir/all] Error 2
make: *** [all] Error 2

It seems that there is no error in the source code.
I also try gcc 7.4.0 with the following: cmake -DCUDA_DIR=${CUDA_HOME} -DCOMPUTE_CAPABILITY=70 -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/export/home/csming/softwire/tinker9 -DGPU_LANG=cuda .. make all Then gave this error:

[  0%] Built target tinkerObjCpp
[ 68%] Built target tinkerObjF
[ 68%] Built target tinkerFToCpp
[ 68%] Built target __t9_main_o
[ 69%] Building CUDA object src/cu/CMakeFiles/tinker9_cu.dir/amoeba/binding.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_UnknownCC'
make[2]: *** [src/cu/CMakeFiles/tinker9_cu.dir/amoeba/binding.cu.o] Error 1
make[1]: *** [src/cu/CMakeFiles/tinker9_cu.dir/all] Error 2
make: *** [all] Error 2

Any idea on how to solve this?Thanks!

mircodaniel commented 10 months ago

Hello, I am also pretty new in tinker9. In the installation documentation (https://github.com/TinkerTools/tinker9/blob/master/doc/manual/m/install/preq.rst) there is a notice that gcc4.85 has very bad support for C++11. The second try with gcc7.4.0 seems due to CUDA related issue. Please insure the number behind -DCOMPUTE_CAPABILITY is what Your graphic card supports (https://developer.nvidia.com/cuda-gpus). Check with nvcc --version You have installed CUDA correctly. If there is no output You have to set the path in .bashrc.

chem1912 commented 8 months ago

Hello, I am also pretty new in tinker9. In the installation documentation (https://github.com/TinkerTools/tinker9/blob/master/doc/manual/m/install/preq.rst) there is a notice that gcc4.85 has very bad support for C++11. The second try with gcc7.4.0 seems due to CUDA related issue. Please insure the number behind -DCOMPUTE_CAPABILITY is what Your graphic card supports (https://developer.nvidia.com/cuda-gpus). Check with nvcc --version You have installed CUDA correctly. If there is no output You have to set the path in .bashrc.

Thanks for your suggestion. I have solved this issue using gcc8.3.0.