# GPU is not detected

**URL:** <https://gromacs.bioexcel.eu/t/gpu-is-not-detected/11779>\
**Category:** User discussions\
**Created:** [March 20, 2025, 1:52pm UTC](https://gromacs.bioexcel.eu/t/gpu-is-not-detected/11779 "2025-03-20T13:52:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GuilleB](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@GuilleB](https://gromacs.bioexcel.eu/u/GuilleB)\
**Post date:** [March 20, 2025, 1:52pm UTC](https://gromacs.bioexcel.eu/t/gpu-is-not-detected/11779/1 "2025-03-20T13:52:06Z")

</div>

GROMACS version: 2025.1  
GROMACS modification: Yes/No  
Hello, I am trying to run GROMACS and I getting the following error:  
Fatal error:  
Cannot run short-ranged nonbonded interactions on a GPU because no GPU is  
detected.

Nevertheless, when I run “gmx --version” I get this:  
GROMACS version: 2025.1  
Precision: mixed  
Memory model: 64 bit  
MPI library: thread\_mpi  
OpenMP support: enabled (GMX\_OPENMP\_MAX\_THREADS = 128)  
GPU support: CUDA  
NBNxM GPU setup: super-cluster 2x2x2 / cluster 8 (cluster-pair splitting on)  
SIMD instructions: AVX2\_256  
CPU FFT library: fftw-3.3.10-sse2-avx-avx2-avx2\_128  
GPU FFT library: cuFFT  
Multi-GPU FFT: none  
RDTSCP usage: enabled  
TNG support: enabled  
Hwloc support: disabled  
Tracing support: disabled  
C compiler: /usr/bin/cc GNU 11.4.0  
C compiler flags: -fexcess-precision=fast -funroll-all-loops -mavx2 -mfma -Wno-missing-field-initializers -O3 -DNDEBUG  
C++ compiler: /usr/bin/c++ GNU 11.4.0  
C++ compiler flags: -fexcess-precision=fast -funroll-all-loops -mavx2 -mfma -Wno-missing-field-initializers -Wno-cast-function-type-strict SHELL:-fopenmp -O3 -DNDEBUG  
BLAS library: Internal  
LAPACK library: Internal  
CUDA compiler: /usr/local/cuda-12/bin/nvcc nvcc: NVIDIA (R) Cuda compiler driver;Copyright (c) 2005-2025 NVIDIA Corporation;Built on Fri\_Feb\_21\_20:23:50\_PST\_2025;Cuda compilation tools, release 12.8, V12.8.93;Build cuda\_12.8.r12.8/compiler.35583870\_0  
CUDA compiler flags: -O3 -DNDEBUG  
CUDA driver: 12.80  
CUDA runtime: 12.80

I installed the software with the following options:  
cmake .. -DGMX\_BUILD\_OWN\_FFTW=ON -DREGRESSIONTEST\_DOWNLOAD=ON -DGMX\_GPU=CUDA -DCMAKE\_PREFIX\_PATH=/usr/local/cuda-12

The error message appears when I run the command mdrun with the -nb gpu option. If I don’t use this option no error message appears, but the CPU is used instead of the GPU.

---

<div class="post-metadata">

**Author:** ![l0vepe0ple](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@l0vepe0ple](https://gromacs.bioexcel.eu/u/l0vepe0ple)\
**Post date:** [March 20, 2025, 3:23pm UTC](https://gromacs.bioexcel.eu/t/gpu-is-not-detected/11779/2 "2025-03-20T15:23:32Z")

</div>

I have same problem, but with amd gpu. Can u show output of mdrun with -nb gpu? Or check my issue (GROMACS cant detect GPU (AMD)) and compare full description of error.  
May be problem with new gromacs version.

---

<div class="post-metadata">

**Author:** ![GuilleB](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@GuilleB](https://gromacs.bioexcel.eu/u/GuilleB)\
**Post date:** [March 21, 2025, 5:01pm UTC](https://gromacs.bioexcel.eu/t/gpu-is-not-detected/11779/3 "2025-03-21T17:01:07Z")

</div>

Hi! The output is exactly the same. As you say, it seems that the new gromacs version is the problem

---

<div class="post-metadata">

**Author:** ![l0vepe0ple](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@l0vepe0ple](https://gromacs.bioexcel.eu/u/l0vepe0ple)\
**Post date:** [March 21, 2025, 5:38pm UTC](https://gromacs.bioexcel.eu/t/gpu-is-not-detected/11779/4 "2025-03-21T17:38:48Z")

</div>

ive reinstalled all the bound programs and drivers (full new rocm, adaptivecpp, hip, llvm), but the result is still the same.

---

<div class="post-metadata">

**Author:** ![l0vepe0ple](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@l0vepe0ple](https://gromacs.bioexcel.eu/u/l0vepe0ple)\
**Post date:** [March 22, 2025, 9:24am UTC](https://gromacs.bioexcel.eu/t/gpu-is-not-detected/11779/5 "2025-03-22T09:24:48Z")

</div>

I think ive found a solution, at least for my case. Try to use GMX\_CUDA\_TARGET\_SM (whith ur sm version) flag in cmake.

For more info check my issue or contact with me.

---

<div class="post-metadata">

**Author:** ![GuilleB](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@GuilleB](https://gromacs.bioexcel.eu/u/GuilleB)\
**Post date:** [March 25, 2025, 1:13pm UTC](https://gromacs.bioexcel.eu/t/gpu-is-not-detected/11779/6 "2025-03-25T13:13:39Z")

</div>

Thanks! I ended up installing the 2024.4 version and it worked, but your solution may be useful for the newest version.
