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

**URL:** <https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected-3/10872>\
**Category:** User discussions\
**Created:** [December 20, 2024, 10:10pm UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected-3/10872 "2024-12-20T22:10:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexmas](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@alexmas](https://gromacs.bioexcel.eu/u/alexmas)\
**Post date:** [December 20, 2024, 10:10pm UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected-3/10872/1 "2024-12-20T22:10:34Z")

</div>

GROMACS version: 2024.2  
GROMACS modification: No

gmx tell me that I do not have GPU available. In reality everything point to a properly installed Nvidia card and driver.

Other users have reported a similar problem but I did not find a solution in those posts. Any suggestion that point me in the right direction is appreciated. Thanks in advance.

I thought the problem could be Secure Boot, which I have disabled with no avail:

```auto
sudo mokutil --sb-state
[sudo] password: 
SecureBoot disabled

```

```auto
nvidia-smi
Fri Dec 20 11:17:06 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.42.02 Driver Version: 555.42.02 CUDA Version: 12.5 |
|-----------------------------------------+------------------------+----------------------+
| 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 RTX 2080 ... On | 00000000:01:00.0 On | N/A |
| 18% 38C P8 17W / 250W | 478MiB / 8192MiB | 10% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 1054 G /usr/lib/xorg/Xorg 119MiB |
| 0 N/A N/A 1223 G /usr/bin/kwalletd5 2MiB |
| 0 N/A N/A 1307 G /usr/bin/ksmserver 2MiB |
| 0 N/A N/A 1309 G /usr/bin/kded5 2MiB |
| 0 N/A N/A 1310 G /usr/bin/kwin_x11 40MiB |
| 0 N/A N/A 1379 G /usr/bin/plasmashell 27MiB |
| 0 N/A N/A 1439 G ...c/polkit-kde-authentication-agent-1 2MiB |
| 0 N/A N/A 1539 G ...86_64-linux-gnu/libexec/kdeconnectd 2MiB |
| 0 N/A N/A 1551 G /usr/bin/kaccess 2MiB |
| 0 N/A N/A 1559 G ...-linux-gnu/libexec/DiscoverNotifier 2MiB |
| 0 N/A N/A 1561 G /usr/bin/kalendarac 2MiB |
| 0 N/A N/A 1595 G /usr/lib/firefox-esr/firefox-esr 250MiB |
| 0 N/A N/A 1698 G ...-gnu/libexec/xdg-desktop-portal-kde 2MiB |
| 0 N/A N/A 1755 G /usr/bin/konsole 2MiB |
+-----------------------------------------------------------------------------------------+

```

```auto
gmx --version
                         :-) GROMACS - gmx, 2024.2 (-:

Executable: /home/alex/Downloads/gromacs-2024.2/build/bin/gmx
Data prefix: /home/alex/Downloads/gromacs-2024.2 (source tree)
Working dir: /home/alex/Modeling/MD/Clean_up_PDB/Models/MD/IAB57M1-50
Command line:
  gmx --version

GROMACS version: 2024.2
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
SIMD instructions: AVX2_256
CPU FFT library: fftw-3.3.8-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 12.2.0
C compiler flags: -fexcess-precision=fast -funroll-all-loops -mavx2 -mfma -Wno-missing-field-initializers -O3 -DNDEBUG
C++ compiler: /usr/bin/c++ GNU 12.2.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: Internal
LAPACK library: Internal
CUDA compiler: /usr/local/cuda-12.5/bin/nvcc nvcc: NVIDIA (R) Cuda compiler driver;Copyright (c) 2005-2024 NVIDIA Corporation;Built on Wed_Apr_17_19:19:55_PDT_2024;Cuda compilation tools, release 12.5, V12.5.40;Build cuda_12.5.r12.5/compiler.34177558_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;-Xcompiler;-fopenmp;-fexcess-precision=fast -funroll-all-loops -mavx2 -mfma -Wno-missing-field-initializers -Wno-cast-function-type-strict -fopenmp -O3 -DNDEBUG
CUDA driver: 12.50
CUDA runtime: 12.50

```

```auto
lspci | grep -i vga
01:00.0 VGA compatible controller: NVIDIA Corporation TU104 [GeForce RTX 2080 SUPER] (rev a1)

```

```auto
ls /dev/nvidia* -l
crw-rw-rw- 1 root root 195, 0 Dec 20 13:52 /dev/nvidia0
crw-rw-rw- 1 root root 195, 255 Dec 20 13:52 /dev/nvidiactl
crw-rw-rw- 1 root root 195, 254 Dec 20 13:52 /dev/nvidia-modeset

/dev/nvidia-caps:
total 0
cr-------- 1 root root 237, 1 Dec 20 13:52 nvidia-cap1
cr--r--r-- 1 root root 237, 2 Dec 20 13:52 nvidia-cap2

```

```auto
cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 555.42.02 Mon May 13 17:24:29 UTC 2024
GCC version: gcc version 12.2.0 (Debian 12.2.0-14)

```

```auto
cat /proc/driver/nvidia/gpus/0000:01:00.0/information
Model: NVIDIA GeForce RTX 2080 SUPER
IRQ: 160
GPU UUID: GPU-2a8ce4c9-b23a-97e8-7dd9-94d8813849be
Video BIOS: 90.04.7a.80.b2
Bus Type: PCIe
DMA Size: 47 bits
DMA Mask: 0x7fffffffffff
Bus Location: 0000:01:00.0
Device Minor: 0
GPU Firmware: 555.42.02
GPU Excluded: No

```

```auto
sudo dmesg |grep NVRM
[4.121381] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 555.42.02 Mon May 13 17:24:29 UTC 2024

```

---

<div class="post-metadata">

**Author:** ![alexmas](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@alexmas](https://gromacs.bioexcel.eu/u/alexmas)\
**Post date:** [January 2, 2025, 8:09pm UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected-3/10872/2 "2025-01-02T20:09:22Z")

</div>

This problem turned out to be not related to GROMACS, but rather the Nvidia kernel module not being loaded (I am not sure what causes it). I am adding the solution here in case it can be of help to other users.

Check that the nvidia kernel module is loaded:

```auto
lsmod | grep nvidia_uvm

```

Then remove the module from the kernel and add it back:

```auto
sudo rmmod nvidia_uvm
sudo modprobe nvidia_uvm

```

This worked for me.

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [January 7, 2025, 8:39am UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected-3/10872/3 "2025-01-07T08:39:27Z")

</div>

Thank you for posting the solution to your problem. Hopefully it will help someone else.
