Gmx mdrun with GPU

GROMACS version: gromacs-2018.6
GROMACS modification: No
I have a large membrane system and I want to run the simulation 250 ns. But the gromacs performance was not enough. I used this command:

  • gmx mdrun -v -deffnm nvt -ntmpi 2 -ntomp 3 -nb gpu -gpu_id 23

The performance was 12.873 ns/day and it is too slow. I am using 2 GPU, how can I enhance this performance? I saw some suggests about -pme gpu and - update gpu. I am not sure how much difference it makes. Has anyone encountered this situation before? Thanks for your help.


Both of these options (and -bonded gpu too) tend to improve things, often a lot, but it is impossible to tell without any details about your system and your hardware.

Have you followed the tips in the Getting good performance from mdrun section of GROMACS manual? There is also a short webinar by Berk Hess covering the basics of performance tuning.

The best thing you can do is try! You can use -maxh or -nsteps options to limit the run time to a few minutes, and then check the performance with different settings. Use performance report at the end of the mdrun log and the materials above to guide your tuning.

It would also be a good idea to use a newer version of GROMACS; there had been quite a few performance improvements in the 5 years since 2018 release.

Thank you so much for your advices. Yes, I looked the Gromacs manuel, it helps a lot. Sure, the problem solved with GROMACS 2021.3 version. I also used -pinoffset, -pinstride, and -pin on options. Its performance is much better than the other. Maybe it will be useful for users who encounter similar problems.