Gmx mdrun -deffnm md_0_1 -nb gpu ** GPU command line error

GROMACS version:
GROMACS modification: Yes/No
Here post your question
Command line:

gmx mdrun -deffnm md_0_1 -nb gpu

Compiled SIMD: SSE2, but for this host/run AVX2_256 might be better (see log).

The current CPU can measure timings more accurately than the code in

gmx mdrun was configured to use. This might affect your simulation

speed as accurate timings are needed for load-balancing.

Please consider rebuilding gmx mdrun with the GMX_USE_RDTSCP=ON CMake option.

Reading file md_0_1.tpr, VERSION 2018.1 (single precision)

Changing nstlist from 10 to 80, rlist from 1 to 1.147

Using 1 MPI thread

Using 8 OpenMP threads

Program: gmx mdrun, version 2018.1

Source file: src/programs/mdrun/runner.cpp (line 1001)

Fatal error:

Cannot run short-ranged nonbonded interactions on a GPU because there is none


Your GROMACS installation is not optimally compiled (see note about SSE2 vs. AVX2_256) and it seems you do not have a GPU installed on this system. If this is not the case, we will need a lot more information about your hardware and what you have done to verify that any GPU is working properly.

Dear Dr. Lemkul sir

Please find the atatchments to see that gpu is enabled, i hope

What does the .log file say about GPU detection? How did you install GROMACS? What was your exact cmake command?

GROMACS version: 2018.1
Precision: single
Memory model: 64 bit
MPI library: thread_mpi
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 64)
GPU support: disabled
SIMD instructions: SSE2
FFT library: fftw-3.3.7-sse2-avx
RDTSCP usage: disabled
TNG support: enabled
Hwloc support: hwloc-1.11.6
Tracing support: disabled
Built on: 2018-03-31 17:12:46
Built by: buildd@debian [CMAKE]
Build OS/arch: Linux x86_64
Build CPU vendor: Intel
Build CPU brand: Westmere E56xx/L56xx/X56xx (Nehalem-C)
Build CPU family: 6 Model: 44 Stepping: 1
Build CPU features: aes apic clfsh cmov cx8 cx16 intel lahf mmx msr pcid pclmuldq pdpe1gb popcnt pse rdtscp sse2 sse3 sse4.1 sse4.2 ssse3 x2apic
C compiler: /usr/bin/cc GNU 7.3.0
C compiler flags: -msse2 -g -O2 -fdebug-prefix-map=/build/gromacs-Fqu8ou/gromacs-2018.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast
C++ compiler: /usr/bin/c++ GNU 7.3.0
C++ compiler flags: -msse2 -g -O2 -fdebug-prefix-map=/build/gromacs-Fqu8ou/gromacs-2018.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++11 -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast

i have used the above protocol to install GROMACS dear sir

Apparently not, because the .log file shows you did not enable GPU support. Please provide the actual cmake command you gave to install GROMACS.

Please follow the official GROMACS installation guide and use a recent release:

root@linux-pc:/home/tom# BUILD AND INSTALL^C
root@linux-pc:/home/tom# # CC=gcc CXX=g++ cmake /home/tom/gromacs-5.1.4 -DGMX_OPENMP=ON -DGMX_GPU=ON -DGMX_BUILD_OWN_FFTW=ON -DGMX_PREFER_STATIC_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/gromacs
root@linux-pc:/home/tom# CC=gcc CXX=g++ cmake /home/tom/gromacs-5.1.4 -DGMX_OPENMP=ON -DGMX_GPU=ON -DGMX_BUILD_OWN_FFTW=ON -DGMX_PREFER_STATIC_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/gromacs
– Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
CMake Error at CMakeLists.txt:552 (message):
Cannot build unit tests without libxml2. Either set
GMX_BUILD_UNITTESTS=OFF or tell CMake how to find a working version of

– Configuring incomplete, errors occurred!
See also “/home/tom/gromacs-5.1.4/CMakeFiles/CMakeOutput.log”.
See also “/home/tom/gromacs-5.1.4/CMakeFiles/CMakeError.log”.

Dear justin lemkul sir

Have i to re install sir

Yes. You need to satisfy all dependencies, and above you get a clear failure message about why cmake failed.

Dear sir

I installed new version successfully after my first installation i could able to run 2020.2 version and after closing the terminal and again opened it, when i type gmx command it says, command not found and install with sudo apt install gromacs and if try installing it, again it is installing 2018-1 old version. How to open new version with gmx command


Screenshot from 2020-05-26 01-19-23

There is no need to install another copy/version of GROMACS. What has happened is you have failed to point to the GROMACS installation so that each time you start up a terminal window the OS can find it. When you first installed it, if you notice at the end of the quick and dirty instructions that is at the top of there was this command:

source /usr/local/gromacs/bin/GMXRC

That command needs to be run each time that you open a terminal window. You can either do it by hand, or better you put it into the shell command that will do it automatically each time for you. For myself I have to add the above line into my .bashrc script (located in my home directory). Yours may be different, so find out what shell you are running, then add the command appropriately to the shell script/command file that is run each time you open a terminal.

did you solve it ?


I ran across the same error. Here’s my log file output:

GROMACS version: 2021.2
Verified release checksum is d91a739522d82c53dc47c2276b9ac5fae3b2119283e84e3a1c7bed8ce741fda2
Precision: mixed
Memory model: 64 bit
MPI library: thread_mpi
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 64)
GPU support: CUDA
SIMD instructions: AVX2_256
FFT library: fftw-3.3.8-sse2-avx
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: disabled
Tracing support: disabled
C compiler: /usr/bin/gcc GNU 9.3.0
C compiler flags: -mavx2 -mfma -Wno-missing-field-initializers -fexcess-precision=fast -funroll-all-loops -O3 -DNDEBUG
C++ compiler: /usr/bin/c++ GNU 9.3.0
C++ compiler flags: -mavx2 -mfma -Wno-missing-field-initializers -fexcess-precision=fast -funroll-all-loops -fopenmp
CUDA compiler: /usr/bin/nvcc nvcc: NVIDIA (R) Cuda compiler driver;Copyright (c) 2005-2019 NVIDIA Corporation;Built on Sun_Jul_28_19:07:16_PDT_2019;Cuda compilation tools, release 10.1, V10.1.243
CUDA compiler flags:-std=c++14;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_35,code=compute_35;-gencode;arch=compute_32,code=compute_32;-use_fast_math;-D_FORCE_INLINES;-mavx2 -mfma -Wno-missing-field-initializers -fexcess-precision=fast -funroll-all-loops -fopenmp
CUDA driver: 11.20
CUDA runtime: N/A

My cmake command was:


Any idea how to fix this? Any help is much appreciated.


Dear all,
I have a smilar problem when I run gromacs-2019.5 on my HPC cluster

This is the message I faced with:

Back Off! I just backed up md_0_1.log to ./#md_0_1.log.6#
:-) GROMACS - gmx mdrun, 2019.5 (-:

                        GROMACS is written by:
 Emile Apol      Rossen Apostolov      Paul Bauer     Herman J.C. Berendsen
Par Bjelkmar      Christian Blau   Viacheslav Bolnykh     Kevin Boyd    

Aldert van Buuren Rudi van Drunen Anton Feenstra Alan Gray
Gerrit Groenhof Anca Hamuraru Vincent Hindriksen M. Eric Irrgang
Aleksei Iupinov Christoph Junghans Joe Jordan Dimitrios Karkoulis
Peter Kasson Jiri Kraus Carsten Kutzner Per Larsson
Justin A. Lemkul Viveca Lindahl Magnus Lundborg Erik Marklund
Pascal Merz Pieter Meulenhoff Teemu Murtola Szilard Pall
Sander Pronk Roland Schulz Michael Shirts Alexey Shvetsov
Alfons Sijbers Peter Tieleman Jon Vincent Teemu Virolainen
Christian Wennberg Maarten Wolf
and the project leaders:
Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel

Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2018, The GROMACS development team at
Uppsala University, Stockholm University and
the Royal Institute of Technology, Sweden.
check out for more information.

GROMACS is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.

GROMACS: gmx mdrun, version 2019.5
Executable: /share/apps/GROMACS/gromacs-2019.5/build/bin/gmx_mpi
Data prefix: /share/apps/GROMACS/gromacs-2019.5/build
Working dir: /home/hpcuser120/phz
Command line:
gmx_mpi mdrun -v -deffnm md_0_1

Sorry couldn’t backup md_0_1.log to ./#md_0_1.log.7#
Compiled SIMD: SSE4.1, but for this host/run AVX2_256 might be better (see
Reading file md_0_1.tpr, VERSION 2019.5 (single precision)

mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

Process name: [[51499,1],5]
Exit code: 1