"Cannot run short-nonbonded interactions on a GPU because no GPU is detected" error

GROMACS version:2021.2
GROMACS modification: Yes
Here post your question

I followed the tutorial and got error when running gmx_mpi mdrun -deffnm md_0_1 -nb gpu

The error said cannot run short-nonbonded interactions on a GPU because no GPU is detected.


However, gmx_mpi --version says GPU support: CUDA.

Output of nvidia-smi says it detects GPU:


Also, when I run gmx_mpi mdrun -deffnm npt for standardization, it detected GPU.


I fixed the gmxManageNvccConfig.cmake in gromacs-2021.2\cmake following this instruction because without it I failed to build gromacs.

Any idea why this error occurs?

gromacs-2021.* cannot be compiled when I do not edit gmxManageNvccConfig.cmake so I started to build Gromacs-2020.6.
Configuration was ran by latest Cmake3.21.1, so should I downgrade it? Which version of CMake should I use?

While the GROMACS build does support CUDA, at the bottom of the version output you can see “CUDA runtime: N/A” which indicates that there is no compatible runtime detected. The reason for this is that your CUDA driver is too old for the the CUDA 11.2 runtime your are using. Upgrade your driver to as sufficiently new one, that should resolve the issues you observe.

Thank you for the suggestion. As you said exactly, the NVIDIA Graphic driver was outdated for 11.2, and upgrading it to the latest version solved the issue.

I got an error when running: gmx mdrun deffnm NVT -nb GPU

When I type gmx – version, it shows following configuration of gpu( I have added it in the consecutive message after this)

How do I resolve this and use the gpu. As I’m runnig for a big protein-ligand complex and hoping to do mdrun for MD.mdp file for 10ns

If you look at the two last lines of the log output you posted, you see the versions of the CUDA driver and the CUDA runtime. These versions must be the same. I would suggest upgrading your CUDA drivers to version 12.30.

Thanks for your reply. Can you please suggest me any proper instruction video/link/article to upgrade my CUDA driver? A few minutes ago I tried to follow this link Updating NVIDIA Driver and CUDA Toolkit — WVU-RC 2023.10.11 documentation but also faced the problem regarding SLURM and so on. Your suggestion would be helpful .

N.b., I’m not an expert at this, but …

First, you can check CUDA 12.3 Update 2 Release Notes to see the official version number of the driver that is required for CUDA runtime 12.3. You will find that >=525.60.13 is what you need (for Linux). You can check if your package manager provides that version. Otherwise, if you Google for that you can download it at e.g., Data Center Driver for Linux x64 | 525.60.13 | Linux 64-bit | NVIDIA or Data Center Driver for Debian 11 | 525.60.13 | Linux 64-bit Debian 11 | NVIDIA, depending on your system. But then you will have to install it yourself, and probably remove the currently installed drivers beforehand.

I hope that helps.