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

**URL:** <https://gromacs.bioexcel.eu/t/mdrun-cpu-only-much-faster-than-gpu-accelerated-wsl2-nvidia/1028>\
**Category:** User discussions\
**Created:** [November 1, 2020, 3:31am UTC](https://gromacs.bioexcel.eu/t/mdrun-cpu-only-much-faster-than-gpu-accelerated-wsl2-nvidia/1028 "2020-11-01T03:31:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joaf55](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@joaf55](https://gromacs.bioexcel.eu/u/joaf55)\
**Post date:** [November 1, 2020, 3:31am UTC](https://gromacs.bioexcel.eu/t/mdrun-cpu-only-much-faster-than-gpu-accelerated-wsl2-nvidia/1028/1 "2020-11-01T03:31:42Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![pszilard](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pszilard/32/21_2.png) [@pszilard](https://gromacs.bioexcel.eu/u/pszilard)\
**Post date:** [November 2, 2020, 6:55pm UTC](https://gromacs.bioexcel.eu/t/mdrun-cpu-only-much-faster-than-gpu-accelerated-wsl2-nvidia/1028/2 "2020-11-02T18:55:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![joaf55](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@joaf55](https://gromacs.bioexcel.eu/u/joaf55)\
**Post date:** [November 3, 2020, 4:52pm UTC](https://gromacs.bioexcel.eu/t/mdrun-cpu-only-much-faster-than-gpu-accelerated-wsl2-nvidia/1028/3 "2020-11-03T16:52:35Z")

</div>

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.
