Gromacs 2018.8 compil error with

GROMACS version:2018.8
GROMACS modification: No

i m getting an error compiling gromacs2018.8 on my system with the following:
cmake … -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs2022 -DCMAKE_BUILD_TYPE=Debug -DGMX_GPU=CUDA -DGMXAPI=ON -

my cuda version is 12.0 and the gpu model: RTX-4060 .

The error complains about " Unsupported gpu architecture 'compute_30"
i tried adding DGMX_CUDA_TARGET_COMPUTE=86 as an option to build but to no avail.
i wonder what is the workaround? is that possible to compile this version with a cuda v12.0 ?

i tried to compile without DGMX_CUDA option , but again i got the below msg:

Blockquote
nvcc fatal : Unsupported gpu architecture ‘compute_30’
CMake Error at libgromacs_generated_pme-3dfft.cu.o.Release.cmake:220 (message):
Error generating
/root/gromacs-2018.8/build/src/gromacs/CMakeFiles/libgromacs.dir/ewald/./libgromacs_generated_pme-3dfft.cu.o

Hi!

GROMACS 2018 is quite old and does not support CUDA 12. The supported GROMACS versions now are 2024.0 and 2023.4, both should work with CUDA 12 just fine.

If, for whatever reason, you cannot use newer GROMACS, then you should clear the build directory, and run cmake with -DGMX_CUDA_TARGET_SM=90 (in addition to whatever other flags you have). RTX-4060 has sm_90 architecture, not sm_86. And when compiling for a fixed device, it’s better to specify the real architecture (GMX_CUDA_TARGET_SM), not a virtual one (GMX_CUDA_TARGET_COMPUTE).

If you want to compile without GPU, you should either clear the build directory of explicitly say -DGMX_GPU=OFF. Your previous choice of GMX_GPU=CUDA is remembered otherwise.

Hi,
Then i shall also downgrade to lower version of CUDA? (and which version is ok?)
thank you for the support.

None of the solutions I suggested require downgrading CUDA. GROMACS 2023/2024 will work fine with CUDA 12. And if you set the CMake flags right, older versions will likely work too, although they will lack the performance tuning for the RTX 40xx series and other improvements added in newer GROMACS versions, such as GPU-resident mode.

But, if you cannot use newer GROMACS and cannot use any of the flags I suggested, then downgrading CUDA could work. The latest version of CUDA supported by GROMACS 2018 is CUDA 10.

i need to use tabulated potential and hence can not go for the recent version. i applied the necessary flags as you suggested and it all went smoothly. thank you.

1 Like