# Cannot run short-ranged nonbonded interactions on a GPU because no GPU is detected 2

**URL:** <https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected-2/10296>\
**Category:** User discussions\
**Created:** [October 7, 2024, 12:22pm UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected-2/10296 "2024-10-07T12:22:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asharma741](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Asharma741](https://gromacs.bioexcel.eu/u/Asharma741)\
**Post date:** [October 7, 2024, 12:22pm UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected-2/10296/1 "2024-10-07T12:22:21Z")

</div>

GROMACS version: 2023  
GROMACS modification: No  
Here post your question :  
Not be able to run gromacs on GPU

I ran the following command:  
gmx mdrun -deffnm NPT -nb gpu  
and got  
:-) GROMACS - gmx mdrun, 2023 (-:

Executable: /usr/local/gromacs/bin/gmx  
Data prefix: /usr/local/gromacs  
Working dir: /home/sharmaji/gromacs trial  
Command line:  
gmx mdrun -deffnm NPT -nb gpu

Back Off! I just backed up NPT.log to ./#NPT.log.8#  
Reading file NPT.tpr, VERSION 2023 (single precision)  
Changing nstlist from 20 to 100, rlist from 1.22 to 1.337

Update groups can not be used for this system because atoms that are (in)directly constrained together are interdispersed with other atoms

* * *

Program: gmx mdrun, version 2023  
Source file: src/gromacs/taskassignment/findallgputasks.cpp (line 85)

Fatal error:  
Cannot run short-ranged nonbonded interactions on a GPU because no GPU is  
detected.

For more information and tips for troubleshooting, please check the GROMACS  
website at [Common Errors — GROMACS webpage https://www.gromacs.org documentation](http://www.gromacs.org/Documentation/Errors)

when I Ran gmx --version  
I got

Executable: /usr/local/gromacs/bin/gmx  
Data prefix: /usr/local/gromacs  
Working dir: /home/sharmaji/gromacs trial  
Command line:  
gmx --version

GROMACS version: 2023  
Precision: mixed  
Memory model: 64 bit  
MPI library: thread\_mpi  
OpenMP support: enabled (GMX\_OPENMP\_MAX\_THREADS = 128)  
GPU support: CUDA  
NB cluster size: 8  
SIMD instructions: AVX2\_256  
CPU FFT library: fftw-3.3.8-sse2-avx  
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 -fopenmp -O3 -DNDEBUG  
BLAS library: External - detected on the system  
LAPACK library: External - detected on the system  
CUDA compiler: /usr/local/cuda/bin/nvcc nvcc: NVIDIA (R) Cuda compiler driver;Copyright (c) 2005-2024 NVIDIA Corporation;Built on Thu\_Sep\_12\_02:18:05\_PDT\_2024;Cuda compilation tools, release 12.6, V12.6.77;Build cuda\_12.6.r12.6/compiler.34841621\_0  
CUDA compiler flags:-std=c++17;–generate-code=arch=compute\_50,code=sm\_50;–generate-code=arch=compute\_52,code=sm\_52;–generate-code=arch=compute\_60,code=sm\_60;–generate-code=arch=compute\_61,code=sm\_61;–generate-code=arch=compute\_70,code=sm\_70;–generate-code=arch=compute\_75,code=sm\_75;–generate-code=arch=compute\_80,code=sm\_80;–generate-code=arch=compute\_86,code=sm\_86;–generate-code=arch=compute\_89,code=sm\_89;–generate-code=arch=compute\_90,code=sm\_90;-Wno-deprecated-gpu-targets;–generate-code=arch=compute\_53,code=sm\_53;–generate-code=arch=compute\_80,code=sm\_80;-use\_fast\_math;-Xptxas;-warn-double-usage;-Xptxas;-Werror;-D\_FORCE\_INLINES;-fexcess-precision=fast -funroll-all-loops -mavx2 -mfma -Wno-missing-field-initializers -Wno-cast-function-type-strict -fopenmp -O3 -DNDEBUG  
CUDA driver: 12.60  
CUDA runtime: 12.60

---

<div class="post-metadata">

**Author:** ![Erik](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@Erik](https://gromacs.bioexcel.eu/u/Erik)\
**Post date:** [October 8, 2024, 3:23pm UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected-2/10296/2 "2024-10-08T15:23:02Z")

</div>

I can’t find anything obviously wrong with your GROMACS information. But for some reason it cannot find a GPU to do calculation on. There are multiple possible reasons for this:

- Does your computer have a GPU?
- Your CUDA driver/runtime used to compile GROMACS may not match the driver/runtime running on your computer
- If you’re on an HPC system, is your resource allocation configured correctly to give you access to a GPU?
- Is your GPU set to exclusive process and there already something running on it?

Most of these can be checked by running `nvidia-smi`
