# Reinstalling GROMACS with CUDA GPU

**URL:** <https://gromacs.bioexcel.eu/t/reinstalling-gromacs-with-cuda-gpu/7319>\
**Category:** User discussions\
**Created:** [October 3, 2023, 5:44am UTC](https://gromacs.bioexcel.eu/t/reinstalling-gromacs-with-cuda-gpu/7319 "2023-10-03T05:44:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JIQuiambao](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@JIQuiambao](https://gromacs.bioexcel.eu/u/JIQuiambao)\
**Post date:** [October 3, 2023, 5:44am UTC](https://gromacs.bioexcel.eu/t/reinstalling-gromacs-with-cuda-gpu/7319/1 "2023-10-03T05:44:15Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![pszilard](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pszilard/32/21_2.png) [@pszilard](https://gromacs.bioexcel.eu/u/pszilard)\
**Post date:** [October 3, 2023, 10:02am UTC](https://gromacs.bioexcel.eu/t/reinstalling-gromacs-with-cuda-gpu/7319/3 "2023-10-03T10:02:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JIQuiambao](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@JIQuiambao](https://gromacs.bioexcel.eu/u/JIQuiambao)\
**Post date:** [October 3, 2023, 11:05am UTC](https://gromacs.bioexcel.eu/t/reinstalling-gromacs-with-cuda-gpu/7319/4 "2023-10-03T11:05:03Z")

</div>

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