Reinstalling GROMACS with CUDA GPU

GROMACS version: 2023.2
GROMACS modification: Yes/No
Here post your question

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

$ nvidia-smi
Tue Oct 3 13:42:40 2023
±--------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.103 Driver Version: 537.13 CUDA Version: 12.2 |
|-----------------------------------------±---------------------±---------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce GTX 1650 On | 00000000:01:00.0 Off | N/A |
| N/A 72C P8 1W / 50W | 0MiB / 4096MiB | 0% Default |
| | | N/A |
±----------------------------------------±---------------------±---------------------+

±--------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 284 G /Xwayland N/A |
±--------------------------------------------------------------------------------------+

I would like to enable GPU acceleration in GROMACS, but when I run this:
$ cmake … -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA

It returns:
– 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: '/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘…’:
435 | function(_Functor&& __f)
|
^
/usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘…’:
530 | operator=(_Functor&& __f)
|
^
/usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’

CMake Error at cmake/gmxManageNvccConfig.cmake:110 (message):
CUDA compiler does not seem to be functional or is not compatible with the
host compiler. Set the GMX_NVCC_WORKS CMake cache variable to bypass this
check if you know what you are doing.
Call Stack (most recent call first):
cmake/gmxManageCuda.cmake:105 (include)
CMakeLists.txt:656 (include)

– Configuring incomplete, errors occurred!
See also “/mnt/d/gromacs-2023.2/build/CMakeFiles/CMakeOutput.log”.
See also “/mnt/d/gromacs-2023.2/build/CMakeFiles/CMakeError.log”.

What can be possibly done to remedy this error?

Thank you!

I suggest upgrading CUDA 11.5 to something newer since there seems to be some incompatibility with your system C++ installation.

I have found a similar problem in the forums dated months back. Tried it and worked like a charm. Thank you!