Performance tuning

GROMACS version: 2024
GROMACS modification: No
Here post your question

Hi, I see the following recommendation in my md.log

NOTE: 7 % of the run time was spent communicating energies,
you might want to increase some nst* mdp options

and when looking at the statistics, I find the following

Comm. energies 2688 1 75001 477.624 2439149.256 7.1

What nst* parameters should i play with to improve this?

Are these parameters safely modifiable without any impact in accuracy?

comm-mode = Linear
nstcomm = 100

There are several parameters that cause energies to be computed and communicated:
nstcalcenergy
nsttcouple (can be set indirectly by tau_t)
nstpcouple (can be set indirectly by tau_p)

  1. Are there possibilities to reduce this by playing with the parameters you have mentioned?
  2. will there be any effect on accuracy?
  3. For an efficient and optimal run, which function will consume the most %time in the md.log statistics?

In most cases you should be able to adjust the parameters to get better performance with affecting accuracy. But I don’t know which settings you have used.

The non-bonded pair calculation and PME usually take the most time.

In my current setup nst* parameters looks like this

nstcomm                        = 100
   nstcgsteep                     = 1000
   nstxout                        = 10000
   nstvout                        = 10000
   nstfout                        = 500000
   nstlog                         = 10000
   nstcalcenergy                  = 100
   nstenergy                      = 10000
   nstxout-compressed             = 10000
   nstlist                        = 10
   ensemble-temperature-setting   = constant
   nsttcouple                     = 10
   nstpcouple                     = 10

Does this info give any hint on what can be paramter can be tuned?

I have Force=52%, PME Mesh *=20%, PME wait for PP * = 6% and Comm. energies = 7%

Those are likely unnecessarily frequent. You can just omit them and if you have your coupling parameters set correctly grompp should pick better values (ideally 50-100).

As I see, in my mdp file these paramters are not defined. Reading the documentation, i understand that default value -1 is assumed and grompp has replaced it with 10.

Is it recommended to change these values to see if it improves performance? will it change the system definition and lead to inaccurate results?

The old default values work like this. Newer grompp versions choose values up to 100 taking into account accuracy needs. What can be used depends on the thermo/barostat and tau values.