GROMACS version:2024.2
GROMACS modification: Yes/No
I recently installed GROMACS with SYCL GPU acceleration for Intel GPUs (UHD graphics 620). I was wondering, is there a command I need to input to run MD simulations using GPU support?
Hi!
GROMACS should use the GPU automatically when possible (if drivers are installed: can be checked by running sycl-ls
). You can look at the gmx mdrun
output to make sure GPU offload is used: you should see something like the following:
1 GPU selected for this run.
Mapping of GPU IDs to the 1 GPU task in the 1 rank on this node:
PP:0
PP tasks will do (non-perturbed) short-ranged interactions on the GPU
You can see how to control which parts are offloaded to the GPU in the user guide. You might get better performance by setting -nb gpu -pme cpu
to force PME computation back to the CPU (it prefers GPU by default), since your integrated GPU is not very powerful.
Good Day.
Thank you for the response. I did my MD simulation in the oneAPI environment. Upon running sycl -ls, I got the following:
[opencl:cpu][opencl:0] Intel(R) OpenCL, Intel(R) Core™ i5-8250U CPU @ 1.60GHz OpenCL 3.0 (Build 0) [2024.18.6.0.02_160000]
However when running the MD simulation, the md.log file seems to indicate that there is no compatible GPU.
GROMACS: gmx mdrun, version 2024.2
Executable: /usr/local/bin/gmx
Data prefix: /usr/local
Working dir: /mnt/c/Users/HP/Documents/gromacs
Process ID: 451
Command line:
gmx mdrun -deffnm md_0_10 -v
GROMACS version: 2024.2
Precision: mixed
Memory model: 64 bit
MPI library: thread_mpi
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 128)
GPU support: SYCL (DPCPP)
NBNxM GPU setup: super-cluster 2x2x2 / cluster 4
SIMD instructions: AVX2_256
CPU FFT library: Intel MKL version 2024.0.2 Build 20240605
GPU FFT library: Intel MKL version 2024.0.2 Build 20240605
Multi-GPU FFT: none
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: disabled
Tracing support: disabled
C compiler: /opt/intel/oneapi/compiler/2024.2/bin/icx IntelLLVM 2024.2.0
C compiler flags: -mavx2 -mfma -Wno-missing-field-initializers
C++ compiler: /opt/intel/oneapi/compiler/2024.2/bin/icpx IntelLLVM 2024.2.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-switch-default -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-cuda-compat -Wno-conditional-uninitialized -Wno-conversion -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-unsafe-buffer-usage -Wno-cast-function-type-strict -fiopenmp
BLAS library: Intel MKL version 2024.0.2 Build 20240605
LAPACK library: Intel MKL version 2024.0.2 Build 20240605
SYCL compiler flags: -fsycl -fsycl-device-code-split=per_kernel -ffast-math -Wno-incorrect-sub-group-size -DSYCL2020_DISABLE_DEPRECATION_WARNINGS
SYCL linker flags: -fsycl -fsycl-device-code-split=per_kernel
SYCL DPC++ version: 20240602 (libsycl 7.2.0)
Running on 1 node with total 4 cores, 8 processing units, 0 compatible GPUs
Hardware detected on host DESKTOP-PBXXXXX:
CPU info:
Vendor: Intel
Brand: Intel(R) Core™ i5-8250U CPU @ 1.60GHz
Family: 6 Model: 142 Stepping: 10
Features: aes apic avx avx2 clfsh cmov cx8 cx16 f16c fma htt intel lahf mmx msr pcid pclmuldq pdpe1gb popcnt pse rdrnd rdtscp sse2 sse3 sse4.1 sse4.2 ssse3
Hardware topology: Basic
Packages, cores, and logical processors:
[indices refer to OS logical processors]
Package 0: [ 0 1] [ 2 3] [ 4 5] [ 6 7]
CPU limit set by OS: -1 Recommended max number of threads: 8
Does this mean that the somehow the integrated GPU is in use but is not indicated explicitly ?
This only detects CPU, no GPU (while it is integrated in the same physical package, it is a separate OpenCL device). Looks like you need to install the GPU OpenCL runtime; on Ubuntu, it’s sudo apt install intel-opencl-icd
.
If all works well, you should have both CPU and GPU, like this:
$ sycl-ls
[opencl:cpu][opencl:0] Intel(R) OpenCL, Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz OpenCL 3.0 (Build 0) [2024.18.6.0.02_160000]
[opencl:gpu][opencl:1] Intel(R) OpenCL Graphics, Intel(R) HD Graphics 530 OpenCL 3.0 NEO [23.43.27642.18]
And then GROMACS would show the GPU in the hardware section of the log:
CPU info:
Vendor: Intel
Brand: Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz
Family: 6 Model: 94 Stepping: 3
Features: aes apic avx avx2 clfsh cmov cx8 cx16 f16c fma htt intel lahf mmx msr nonstop_tsc pcid pclmuldq pdcm pdpe1gb popcnt pse rdrnd rdtscp sse2 sse3 sse4.1 sse4.2 ssse3 tdt x2apic
Hardware topology: Basic
Packages, cores, and logical processors:
[indices refer to OS logical processors]
Package 0: [ 0] [ 1] [ 2] [ 3]
CPU limit set by OS: -1 Recommended max number of threads: 4
GPU info:
Number of GPUs detected: 1
#0: name: Intel(R) HD Graphics 530, vendor: Intel(R) Corporation, device version: OpenCL 3.0 NEO , status: compatible
Thank you very much. I now GROMACS with GPU support.