# Unable to enable GROMACS with GPU

**URL:** <https://gromacs.bioexcel.eu/t/unable-to-enable-gromacs-with-gpu/8068>\
**Category:** User discussions\
**Created:** [January 18, 2024, 10:08am UTC](https://gromacs.bioexcel.eu/t/unable-to-enable-gromacs-with-gpu/8068 "2024-01-18T10:08:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akki](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/akki/32/958_2.png) [@Akki](https://gromacs.bioexcel.eu/u/Akki)\
**Post date:** [January 18, 2024, 10:08am UTC](https://gromacs.bioexcel.eu/t/unable-to-enable-gromacs-with-gpu/8068/1 "2024-01-18T10:08:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Harry](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@Harry](https://gromacs.bioexcel.eu/u/Harry)\
**Post date:** [January 21, 2024, 10:12am UTC](https://gromacs.bioexcel.eu/t/unable-to-enable-gromacs-with-gpu/8068/2 "2024-01-21T10:12:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Akki](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/akki/32/958_2.png) [@Akki](https://gromacs.bioexcel.eu/u/Akki)\
**Post date:** [January 21, 2024, 10:26am UTC](https://gromacs.bioexcel.eu/t/unable-to-enable-gromacs-with-gpu/8068/3 "2024-01-21T10:26:06Z")

</div>

I have tried it but its not working…

---

<div class="post-metadata">

**Author:** ![Harry](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@Harry](https://gromacs.bioexcel.eu/u/Harry)\
**Post date:** [January 21, 2024, 10:49am UTC](https://gromacs.bioexcel.eu/t/unable-to-enable-gromacs-with-gpu/8068/4 "2024-01-21T10:49:57Z")

</div>

BS"D

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

---

<div class="post-metadata">

**Author:** ![yaqinkdr](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/yaqinkdr/32/3998_2.png) [@yaqinkdr](https://gromacs.bioexcel.eu/u/yaqinkdr)\
**Post date:** [November 21, 2024, 8:54pm UTC](https://gromacs.bioexcel.eu/t/unable-to-enable-gromacs-with-gpu/8068/5 "2024-11-21T20:54:01Z")

</div>

Please help me. I have a similar problem when installing GROMACS 2024.4 with an RTX 3090 GPU, CUDA 12.4, and GCC 11.4.0 (I think its compatible). I have already run:

cmake … -DGMX\_BUILD\_OWN\_FFTW=ON -DREGRESSIONTEST\_DOWNLOAD=ON -DGMX\_GPU=CUDA

but the GPU remains disabled and not detected. I don’t get any error messages.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/9/93532933869dd0084b1b300583a32acf7b6d0f1d.png)  
 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/b/b5f61dba88c575f6f1191d472cf06f858f26b703.png)

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [November 22, 2024, 10:11am UTC](https://gromacs.bioexcel.eu/t/unable-to-enable-gromacs-with-gpu/8068/7 "2024-11-22T10:11:14Z")

</div>

Hi!

`GPU support: disabled` means that the version of GROMACS you are running is **not** the one built with `-DGMX_GPU=CUDA`.

Just to make sure: `cmake` command only _prepares_ GROMACS build. After that, you need to run `make && make check && sudo make install` to actually compile and install the new version. If you already did that: you can check the output of `sudo make install` to see where the new version is installed, and run `which gmx` to see what binary is run when you type `gmx`.

---

<div class="post-metadata">

**Author:** ![sizhe\_Li](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@sizhe\_Li](https://gromacs.bioexcel.eu/u/sizhe_Li)\
**Post date:** [December 25, 2024, 9:07am UTC](https://gromacs.bioexcel.eu/t/unable-to-enable-gromacs-with-gpu/8068/8 "2024-12-25T09:07:55Z")

</div>

The same question：  
I try to run: cmake … -DGMX\_BUILD\_OWN\_FFTW=ON -DREGRESSI  
ONTEST\_DOWNLOAD=ON -DGMX\_GPU=CUDA  
GROMACS 2024.4 with an RTX 3090 GPU, CUDA 12.2, and GCC 12.2.0

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/3/3fabf9a22a3ec6084bc59e0b1119a78ea6b56cda.png)

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [December 25, 2024, 9:11am UTC](https://gromacs.bioexcel.eu/t/unable-to-enable-gromacs-with-gpu/8068/9 "2024-12-25T09:11:42Z")

</div>

Dear @sizhe_Li

The error is stating that you cannot use gcc \> 12, and you are using gcc 12.2.0. Install a previous version (11.x)!
