GPU based gromacs installation with nvcc error; compute 35

GROMACS version: 2021.5
GROMACS modification: No

I am trying to install gromacs 2021.5 using GPU CUDA version 12. However, I am getting the following error:
nvcc fatal : Unsupported gpu architecture ‘compute_35’
CMake Error at libgromacs_generated_gpuhaloexchange_impl.cu.o.Release.cmake:220 (message):
Error generating
/home/sdsos/gromacs-2021.5/build/src/gromacs/CMakeFiles/libgromacs.dir/domdec/./libgromacs_generated_gpuhaloexchange_impl.cu.o

I have tried all possible solutions but still getting the same error. Please suggest.

Hi,

GROMACS 2021 requests compilation for CUDA compute capabilities 3.5 and later (as configured in gmxManageNvccConfig.cmake), but CUDA 12 does not support 3.5 any more. To solve that issue, you could use an earlier CUDA version if you have (CUDA 11.0 would do the trick, e.g.) or you could also directly specify the compute cabability of your GPU via the CMake variables -DGMX_CUDA_TARGET_COMPUTE and -DGMX_CUDA_TARGET_SM. What GPU model are you compiling for?

Hope that helps!
Carsten

Hi,

In addition to Carsten’s great answer, another option is to use GROMACS 2022 or newer, which has “smarter” detection of compiler flags and should handle the lack of CC 3.5 support in CUDA 12 gracefully.

Okay Sir. I will give it a try. Thank you.

I would have used 2022 but my previous simulations were from 2021. Anyways, thank you for the suggestion!

Hey,
I am not able to install the older versions. My GPU version is;
NVIDIA RTX A5000 (UUID: GPU-e803b49f-c89f-066e-a19b-d2b86d7ee6cc)

Can you please tell me what values would come in these variables; -DGMX_CUDA_TARGET_COMPUTE= ? and -DGMX_CUDA_TARGET_SM = ?

For RTX A5000, please use -DGMX_CUDA_TARGET_SM=86.

A very convenient list of NVIDIA devices’ compute capabilities can be found at Matching CUDA arch and CUDA gencode for various NVIDIA architectures - Arnon Shimoni.

Okay. I will try. Thank you so much

Hey, it worked! Thank you so much.

hey, I install gromocs through follwong command but GPU not supporting

Fatal error:
Cannot run short-ranged nonbonded interactions on a GPU because no GPU is
detected.

tar xfz gromacs-2021.4.tar.gz
cd gromacs-2021.4
mkdir build
cd build
cmake … -DGMX_CUDA_TARGET_SM=86 -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda -DGMX_GPU=ON
make
make check
sudo make install
source /usr/local/gromacs/bin/GMXRC
gmx mdrun -deffnm md_0_10 -nb gpu

MY system configration is
processor Intel® Core™ i5-10400F × 12
memory 16GM
Graphics NVIDIA Corporation GK208B [GeForce GT 710]
disk capicity 2TB

hey, I install gromocs through follwong command but GPU not supporting

Fatal error:
Cannot run short-ranged nonbonded interactions on a GPU because no GPU is
detected.

tar xfz gromacs-2021.4.tar.gz
cd gromacs-2021.4
mkdir build
cd build
cmake … -DGMX_CUDA_TARGET_SM=86 -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda -DGMX_GPU=ON
make
make check
sudo make install
source /usr/local/gromacs/bin/GMXRC
gmx mdrun -deffnm md_0_10 -nb gpu

MY system configration is
processor Intel® Core™ i5-10400F × 12
memory 16GM
Graphics NVIDIA Corporation GK208B [GeForce GT 710]
disk capicity 2TB

Usually this means you have some kind of mismatch between your CUDA library and driver versions. What is the output of gmx mdrun --version?

Hi!

You are compiling with -DGMX_CUDA_TARGET_SM=86, but your device is 3.5. Please, use the correct flags when building GROMACS (or omit DGMX_CUDA_TARGET_SM altogether) and the compatible CUDA version (11.x, not 12.x).