OpenMP

PLUMED is partly parallelized using OpenMP. This should be enabled by default if your compiler supports it, and can be disabled with --disable-openmp.. At runtime, you should set the environment variable PLUMED_NUM_THREADS to the number of threads you wish to use with PLUMED. By default (if PLUMED_NUM_THREADS is unset) openmp will be disabled at runtime. E.g., to run with gromacs you should do:

export PLUMED_NUM_THREADS=8
mdrun -plumed


Notice that:

• This option is likely to improve the performance, but could also slow down the code in some case.
• Results could be slightly different because of numerical roundoff and different order in summations. This should be harmless.
• The optimum number of threads is not necessary "all of them", nor should be equal to the number of threads used to parallelize MD.
• Only a few CVs are parallelized with opemMP (currently, COORDINATION and DHENERGY).
• You might want to tune also the environmental variable PLUMED_CACHELINE_SIZE, by default 512, to set the size of cachelines on your machine. This is used by PLUMED to decrease the number of threads to be used in each loop so as to avoid clashes in memory access. This variable is expected to affect performance only, not results.