Gmx mdrun (with OpenCL) no GPU detected

GROMACS version:2023.2
GROMACS modification: Yes/No
Here post your question

Executable: /usr/local/gromacs-2023.2/bin/gmx
Data prefix: /usr/local/gromacs-2023.2
Working dir: /home/1/tutegmx
Command line:
gmx --version

GROMACS version: 2023.2
Precision: mixed
Memory model: 64 bit
MPI library: thread_mpi
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 128)
GPU support: OpenCL
NB cluster size: 8
SIMD instructions: AVX2_256
CPU FFT library: Intel MKL version 2023.0.1 Build 20230303
GPU FFT library: clFFT
Multi-GPU FFT: none
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: hwloc-2.7.0
Tracing support: disabled
C compiler: /opt/intel/oneapi/compiler/2023.1.0/linux/bin/icx IntelLLVM 2023.1.0
C compiler flags: -mavx2 -mfma -Wno-missing-field-initializers -O3 -DNDEBUG
C++ compiler: /opt/intel/oneapi/compiler/2023.1.0/linux/bin/icpx IntelLLVM 2023.1.0
C++ compiler flags: -mavx2 -mfma -Wno-reserved-identifier -Wno-missing-field-initializers -Wno-pass-failed -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-source-uses-openmp -Wno-c++17-extensions -Wno-documentation-unknown-command -Wno-covered-switch-default -Wno-switch-enum -Wno-extra-semi-stmt -Wno-weak-vtables -Wno-shadow -Wno-padded -Wno-reserved-id-macro -Wno-double-promotion -Wno-exit-time-destructors -Wno-global-constructors -Wno-documentation -Wno-format-nonliteral -Wno-used-but-marked-unused -Wno-float-equal -Wno-conditional-uninitialized -Wno-conversion -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-unsafe-buffer-usage -Wno-cast-function-type-strict -fiopenmp -O3 -DNDEBUG
BLAS library: Intel MKL version 2023.0.1 Build 20230303
LAPACK library: Intel MKL version 2023.0.1 Build 20230303
OpenCL include dir: /usr/include
OpenCL library: /usr/lib/x86_64-linux-gnu/libOpenCL.so
OpenCL version: 2.2

when I run mdrun with -nb gpu I am told:
Cannot run short-ranged nonbonded interactions on a GPU because no GPU is
detected.

how can I run nb on gpu

thanks

Hi!

From the error message you posted it’s hard to tell anything. Please attach the full log file (md.log), it should contain more details. Do you have a GPU? Which one? What is your OS?

Since you are building with Intel compilers, I assume you have an Intel GPU. In this case:

  1. Per the installation guide, you should add -DGMX_GPU_NB_CLUSTER_SIZE=4 to your CMake call when building GROMACS. Otherwise, a data layout incompatible with desktop Intel GPUs will be used.

  2. However, you might be better off ditching OpenCL and using SYCL instead. It is more optimized and has better feature support.