# How to improve performance of gromacs?

**URL:** https://gromacs.bioexcel.eu/t/how-to-improve-performance-of-gromacs/498
**Category:** User discussions
**Created:** [July 15, 2020, 4:44am UTC](https://gromacs.bioexcel.eu/t/how-to-improve-performance-of-gromacs/498 "2020-07-15T04:44:54Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![darrenphua](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@darrenphua](https://gromacs.bioexcel.eu/u/darrenphua)
#### Post date: [July 15, 2020, 4:44am UTC](https://gromacs.bioexcel.eu/t/how-to-improve-performance-of-gromacs/498/1 "2020-07-15T04:44:54Z")

</div>

GROMACS version: 2020.3

GROMACS version: 2020.3-MODIFIED  
This program has been built from source code that has been altered and does not match the code released as part of the official GROMACS version 2020.3-MODIFIED. If you did not intend to use an altered GROMACS version, make sure to download an intact source distribution and compile that before proceeding.  
If you have modified the source code, you are strongly encouraged to set your custom version suffix (using -DGMX\_VERSION\_STRING\_OF\_FORK) which will can help later with scientific reproducibility but also when reporting bugs.  
Release checksum: c0599e547549c2d0ef4fc678dc5a26ad0000eab045e938fed756f9ff5b99a197  
Computed checksum: 0c3db5f0820182974c80d37f12fef2b8c01cfc339569e0ef607045b5c5bfcbdb  
Precision: single  
Memory model: 64 bit  
MPI library: thread\_mpi  
OpenMP support: enabled (GMX\_OPENMP\_MAX\_THREADS = 64)  
GPU support: disabled  
SIMD instructions: AVX2\_256  
FFT library: Intel MKL  
RDTSCP usage: enabled  
TNG support: enabled  
Hwloc support: disabled  
Tracing support: disabled  
C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe MSVC 19.26.28806.0  
C compiler flags: /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG  
C++ compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe MSVC 19.26.28806.0  
C++ compiler flags: /arch:AVX2 /wd4800 /wd4355 /wd4996 /wd4305 /wd4244 /wd4101 /wd4267 /wd4090 /wd4068 /analyze /analyze:stacksize 70000 /wd6001 /wd6011 /wd6053 /wd6054 /wd6385 /wd6386 /wd6387 /wd28199 /wd6239 /wd6240 /wd6294 /wd6326 /wd28020 /wd6330 /wd6993 /wd6031 /wd6244 /wd6246 -openmp /MD /O2 /Ob2 /DNDEBUG

Command line:  
gmx mdrun -deffnm npt -ntmpi 1 -ntomp 2

Back Off! I just backed up npt.log to ./#npt.log.1#  
Reading file npt.tpr, VERSION 2020.3-MODIFIED (single precision)  
Changing nstlist from 10 to 100, rlist from 1.2 to 1.255

Using 1 MPI thread  
Using 2 OpenMP threads

Non-default thread affinity set probably by the OpenMP library,  
disabling internal thread affinity  
starting mdrun ‘Protein in water’  
100000 steps, 100.0 ps.

Writing final coordinates.

```
           Core t (s) Wall t (s) (%)
   Time: 126648.000 63324.000 200.0
                     17h35:24
                        (ns/day) (hour/ns)

```

Performance: 0.136 175.898

This took ridiculously long to complete, for a single IgG equilibration. Compared to other posts here that stated their performance of gromacs, 0.136 ns/day is not feasible to do any simulation for large biomolecules.

I have already tried to optimize gromacs for my system, that runs on windows 10, Intel® Core™ i5-6300U CPU

For 0.136 ns/day that i obtained for this run above, is that an acceptable value for my operating system?

---

<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: [July 15, 2020, 1:53pm UTC](https://gromacs.bioexcel.eu/t/how-to-improve-performance-of-gromacs/498/2 "2020-07-15T13:53:38Z")

</div>

How large is your system? A dual-core laptop CPU is generally not suitable for production runs unless your simulated system is very small.

---

<div class="post-metadata">

### Author: ![darrenphua](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@darrenphua](https://gromacs.bioexcel.eu/u/darrenphua)
#### Post date: [July 15, 2020, 2:46pm UTC](https://gromacs.bioexcel.eu/t/how-to-improve-performance-of-gromacs/498/3 "2020-07-15T14:46:52Z")

</div>

IgGof roughly 150kDa should be more than 10000 atoms.  
Are there any estimates or benchmarks out there for different computer set ups and different simulation systems?  
Maybe itll be easier to guage run times in that way?

---

<div class="post-metadata">

### Author: ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)
#### Post date: [July 15, 2020, 6:49pm UTC](https://gromacs.bioexcel.eu/t/how-to-improve-performance-of-gromacs/498/4 "2020-07-15T18:49:42Z")

</div>

Just Google “GROMACS benchmarks” and you’ll find tons.

One example: [https://hpc.nih.gov/apps/gromacs/](https://hpc.nih.gov/apps/gromacs/)

Generally you want to shoot for a few hundred atoms per processor when using CPU-only mode. 10k atoms will never perform well on a dual-core machine.

---

<div class="post-metadata">

### Author: ![darrenphua](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@darrenphua](https://gromacs.bioexcel.eu/u/darrenphua)
#### Post date: [July 16, 2020, 1:50am UTC](https://gromacs.bioexcel.eu/t/how-to-improve-performance-of-gromacs/498/5 "2020-07-16T01:50:39Z")

</div>

ah no wonder it is so slow on my laptop… when considering the number of atoms, this includes solvent molecules and not just the molecule of interest?

---

<div class="post-metadata">

### Author: ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)
#### Post date: [July 16, 2020, 2:08am UTC](https://gromacs.bioexcel.eu/t/how-to-improve-performance-of-gromacs/498/6 "2020-07-16T02:08:17Z")

</div>

Everything in the simulation system matters. You spend about 90% of the calculation time on water…

---

<div class="post-metadata">

### Author: ![darrenphua](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@darrenphua](https://gromacs.bioexcel.eu/u/darrenphua)
#### Post date: [July 16, 2020, 2:33am UTC](https://gromacs.bioexcel.eu/t/how-to-improve-performance-of-gromacs/498/7 "2020-07-16T02:33:26Z")

</div>

Wow…didn’t know water takes that much computation time! Thanks Justin

---

<div class="post-metadata">

### Author: ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)
#### Post date: [July 16, 2020, 2:52am UTC](https://gromacs.bioexcel.eu/t/how-to-improve-performance-of-gromacs/498/8 "2020-07-16T02:52:08Z")

</div>

It’s not that water takes some special amount of time, but about 90% of the atoms in most systems belong to water. Hence that’s what ends up eating up the computation time.

---

<div class="post-metadata">

### Author: ![darrenphua](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@darrenphua](https://gromacs.bioexcel.eu/u/darrenphua)
#### Post date: [July 16, 2020, 3:05am UTC](https://gromacs.bioexcel.eu/t/how-to-improve-performance-of-gromacs/498/9 "2020-07-16T03:05:45Z")

</div>

That’s true…thanks for the correction

No wonder so much emphasis is on reducing box volume with different geometries
