GROMACS version: 2023.1
GROMACS modification: No
I am trying to compile Gromacs on a computer with NVIDIA GeForce RTX 3090 (sm86), and there is always an error towards the end of make, even though cmake passes successfully! The current error I have is at the bottom, and is related to “/home/pablo/miniconda3/bin/…/lib/gcc/x86_64-conda-linux-gnu/11.4.0/…/…/…/…/x86_64-conda-linux-gnu/bin/ld: /home/pablo/miniconda3/lib/libcudart.so.11.0: undefined reference to `memcpy@GLIBC_2.14’”. If I compile without GPU support, I am able to make a fully functional gmx executable
current versions:
Blockquote
(base) pablo@dl:~/repos/gromacs-2023.1/build$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
Blockquote
(base) pablo@dl:~/repos/gromacs-2023.1/build$ gcc --version; g++ --version
gcc (conda-forge gcc 11.4.0-0) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
g++ (conda-forge gcc 11.4.0-0) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Blockquote
(base) pablo@dl:~/repos/gromacs-2023.1/build$ conda --version
conda 23.5.0
(base) pablo@dl:~/repos/gromacs-2023.1/build$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
(base) pablo@dl:~/repos/gromacs-2023.1/build$ cmake --version
cmake version 3.26.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).
Blockquote
(base) pablo@dl:~/repos/gromacs-2023.1/build$ ls /home/pablo/miniconda3/lib/libcufft.so.10
/home/pablo/miniconda3/lib/libcufft.so.10
(base) pablo@dl:~/repos/gromacs-2023.1/build$ ls /home/pablo/miniconda3/lib/libcudart.so.11.0
/home/pablo/miniconda3/lib/libcudart.so.11.0
full story:
I tried running:
**cmake** .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_EXTERNAL_BLAS=OFF -DGMX_EXTERNAL_LAPACK=OFF -DGMX_GPU=CUDA -DCMAKE_INSTALL_PREFIX=/home/pablo/repos/gromacs_tar -DGMX_CUDA_TARGET_SM="86" -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc
and got libcudart.so.11.0 not found when building:
Blockquote
[ 96%] Linking CXX executable …/…/…/bin/argon-forces-integration
/home/pablo/miniconda3/bin/…/lib/gcc/x86_64-conda-linux-gnu/11.4.0/…/…/…/…/x86_64-conda-linux-gnu/bin/ld: warning: libcudart.so.11.0, needed by …/…/…/lib/libnblib_gmx.so.0.1.0, not found (try using -rpath or -rpath-link)
/home/pablo/miniconda3/bin/…/lib/gcc/x86_64-conda-linux-gnu/11.4.0/…/…/…/…/x86_64-conda-linux-gnu/bin/ld: warning: libcufft.so.10, needed by /home/pablo/repos/gromacs-2023.1/build/lib/libgromacs.so.8, not found (try using -rpath or -rpath-link)
/home/pablo/miniconda3/bin/…/lib/gcc/x86_64-conda-linux-gnu/11.4.0/…/…/…/…/x86_64-conda-linux-gnu/bin/ld: /home/pablo/repos/gromacs-2023.1/build/lib/libgromacs.so.8: undefined reference tocufftSetStream@libcufft.so.10' /home/pablo/miniconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/pablo/repos/gromacs-2023.1/build/lib/libgromacs.so.8: undefined reference to
cufftExecR2C@libcufft.so.10’
/home/pablo/miniconda3/bin/…/lib/gcc/x86_64-conda-linux-gnu/11.4.0/…/…/…/…/x86_64-conda-linux-gnu/bin/ld: /home/pablo/repos/gromacs-2023.1/build/lib/libgromacs.so.8: undefined reference tocufftExecC2R@libcufft.so.10' /home/pablo/miniconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/pablo/repos/gromacs-2023.1/build/lib/libgromacs.so.8: undefined reference to
cufftDestroy@libcufft.so.10’
/home/pablo/miniconda3/bin/…/lib/gcc/x86_64-conda-linux-gnu/11.4.0/…/…/…/…/x86_64-conda-linux-gnu/bin/ld: /home/pablo/repos/gromacs-2023.1/build/lib/libgromacs.so.8: undefined reference to `cufftPlanMany@libcufft.so.10’
collect2: error: ld returned 1 exit status
make[2]: *** [api/nblib/samples/CMakeFiles/argon-forces-integration.dir/build.make:100: bin/argon-forces-integration] Error 1
make[1]: *** [CMakeFiles/Makefile2:3764: api/nblib/samples/CMakeFiles/argon-forces-integration.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
So then I conda installed that and libcufft.so.10 with:
- conda install -c anaconda cudatoolkit=11.8
- `conda install -c "nvidia/label/cuda-11.8.0" libcufft`
after Installing, I did export LD_LIBRARY_PATH=/home/pablo/miniconda3/lib
, and reran
cmake … -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_EXTERNAL_BLAS=OFF -DGMX_EXTERNAL_LAPACK=OFF -DGMX_GPU=CUDA -DCMAKE_INSTALL_PREFIX=/home/pablo/repos/gromacs_tar -DGMX_CUDA_TARGET_SM=“86” -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc
but am now getting:
Blockquote
[ 96%] Linking CXX executable …/…/…/bin/argon-forces-integration
/home/pablo/miniconda3/bin/…/lib/gcc/x86_64-conda-linux-gnu/11.4.0/…/…/…/…/x86_64-conda-linux-gnu/bin/ld: /home/pablo/miniconda3/lib/libcudart.so.11.0: undefined reference tomemcpy@GLIBC_2.14' /home/pablo/miniconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/pablo/miniconda3/lib/libcudart.so.11.0: undefined reference to
clock_gettime@GLIBC_2.17’
collect2: error: ld returned 1 exit status
make[2]: *** [api/nblib/samples/CMakeFiles/argon-forces-integration.dir/build.make:100: bin/argon-forces-integration] Error 1
make[1]: *** [CMakeFiles/Makefile2:3764: api/nblib/samples/CMakeFiles/argon-forces-integration.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
Could someone please help me fix this error because it seems inside of libcudart.so.11.0?? Thank you!!