GPU Acceleration Not Activating (0% Utilization)

Hey everyone,
I’m having a bit of trouble with GPU acceleration in LAMMPS 4Feb2025 and was hoping to get some input. Here’s what’s going on:
I’m using an RTX 4060 Ti, and when compiling LAMMPS, I enabled the GPU package (PKG_GPU=ON), configured the CUDA path correctly, and set the GPU architecture to sm_89 (which matches the card’s compute capability).
But when I run with this command:

mpirun -np 8 ~/Downloads/lammps-4Feb2025/build/lmp -in in.simulation -sf gpu -pk gpu 1  

nvidia-smi shows 0% GPU utilization the entire time, and there’s no speedup compared to running without GPU acceleration.
I’ve checked the CMake logs to confirm PKG_GPU is enabled, the CUDA path is correct, and the executable (build/lmp) exists. Wondering if I messed up the command flags? Or do I need to specifically use GPU-enabled pair styles in the input script (like pair_style …/gpu)? Is there a way to check if LAMMPS is actually loading the GPU kernels?
Any help or ideas would be really appreciated—thanks!

Is the pair style in your input accelerated by the GPU package?

Hello, my pair_style is “pair_style reaxff NULL safezone 3.0 mincap 150”, and the warning “Using package gpu without any pair style defined” appears in the log.

Please check the documentation for your pair style.

1 Like

Okay, thank you!

Dear akohlmey,
I’m truly grateful for your prompt reply. Following your advice to check the pair style documentation, I switched to reaxff/kk and refined the KOKKOS configurations. Now the GPU acceleration works flawlessly, and my simulation is running successfully!
Thank you again for your invaluable guidance.

2 Likes