Unable to enable GROMACS with GPU

GROMACS version: 2020.1
GROMACS modification: Yes/No
Here post your question: Dear GROMACS users,
I am trying to make my GROMACS GPU enabled… I have already installed GROMACS on my system and trying to enable it on GPU:
sudo cmake … -DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda
but it is throwing error:
Check for working NVCC/C++ compiler combination with nvcc ‘/usr/bin/nvcc’
– Check for working NVCC/C compiler combination - broken
– /usr/bin/nvcc standard output: ‘’
– /usr/bin/nvcc standard error: 'In file included from /usr/include/cuda_runtime.h:83,
from :
/usr/include/crt/host_config.h:138:2: error: #error – unsupported GNU version! gcc versions later than 8 are not supported!
138 | #error – unsupported GNU version! gcc versions later than 8 are not supported!
| ^~~~~

CMake Error at cmake/gmxManageNvccConfig.cmake:182 (message):
NVCC/C++ compiler combination does not seem to be supported. CUDA
frequently does not support the latest versions of the host compiler, so
you might want to try an earlier C++ compiler version and make sure your
CUDA compiler and driver are as recent as possible.
Call Stack (most recent call first):
cmake/gmxManageGPU.cmake:208 (include)
CMakeLists.txt:578 (gmx_gpu_setup)

– Configuring incomplete, errors occurred!
See also “/home/dms/Downloads/gromacs-2020.4/build/CMakeFiles/CMakeOutput.log”.
See also “/home/dms/Downloads/gromacs-2020.4/build/CMakeFiles/CMakeError.log”.

Please help me resolving this issue…

I have installed gcc version-8 as well, but still it is not working

BS"D

It’s telling you that your version of cuda and gcc are not compatible. You should use a later version of cuda (of course that may force you to update the Nvidia driver on that machine).

Harry

I have tried it but its not working…

BS"D

Which version of cuda do you have, and what is linked to /usr/local/cuda?