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

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

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

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