Mdrun: CPU-only much faster than GPU accelerated (WSL2, NVidia)

GROMACS version:2020.4
GROMACS modification: No
Hello everyone.

I am running Gromacs 2020.4 on WSL2, with NVidia CUDA acceleration. However, for some reason, mdrun using CPU only
(i.e. using gmx mdrun -ntmpi 1 -nb cpu -pme cpu -bonded cpu) is MUCH faster than with GPU
(i.e. using gmx mdrun -ntmpi 1 -nb gpu -pme gpu -bonded gpu), like 1h vs. 5h for 10ns of simulation.

It is also odd to me that GPU usage is only at around 2% during simulation.
I want to run as much in GPU as possible considering I have a really weak CPU (i5-6600) vs. a relatively good GPU (GTX 1070).

I should add, most of the time spent in the GPU accelerated sim. is in “Launch GPU ops”. For this I have set the GMX_DISABLE_GPU_TIMING environment variable as it says in the documentation, but it still does not perform well.

Is there something I am doing wrong?
Thanks in advance!

Hi,

Can you share log files of the two runs? In addition, please share a log of a GPU run with timing disabled but only nonbondeds offloaded (to help observe where is time spent on the GPU):
GMX_ENABLE_GPU_TIMING=1 gmx mdrun -nb gpu -pme cpu -bonded cpu -update cpu

Cheers,
Szilárd

Hi,

Thanks for your reply, but I have since installed ubuntu proper on my PC as a dualboot, and now it’s working wonderfully. Since I used exactly the same method for installation I can only assume it has to do with the fact that cuda support is still limited in WSL.