Skip to content

Commit

Permalink
documentation of benchmark tool
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanniBussi committed Mar 1, 2024
1 parent d4e7788 commit f7d210b
Showing 1 changed file with 49 additions and 2 deletions.
51 changes: 49 additions & 2 deletions src/cltools/Benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,61 @@ benchmarks agaist previous plumed versions
\par Examples
First, you should create a sample `plumed.dat` file for testing. For instance:
```
WHOLEMOLECULES ENTITY0=1-10000
p: POSITION ATOM=1
RESTRAINT ARG=p.x KAPPA=1 AT=0
```
Then you can test the performance of this input with the following command:
\verbatim
plumed benchmark
\endverbatim
You can also test a different (older) version of PLUMED with the same input. To do so,
you should run
\verbatim
plumed benchmark --plumed plumed.dat
plumed-runtime benchmark --kernel /path/to/lib/libplumedKernel.so
\endverbatim
\warning It is necessary to use the `plumed-runtime` executable here to avoid conflicts between different
plumed versions. You will find it in `src/lib` if you are using the non installed version of plumed,
and in `$prefix/lib/plumed` if you installed plumed in $prefix,.
The best way to compare two versions of plumed on the same input is to pass multiple colon-separated kernels:
\verbatim
plumed benchmark --plumed plumed.dat --kernel /path/to/libplumedKernel.so
plumed-runtime benchmark --kernel /path/to/lib/libplumedKernel.so:/path2/to/lib/libplumedKernel.so:this
\endverbatim
Here `this` means the kernel of the version with which you are running the benchmark. This comparison runs the three
instances simultaneously (alternating them) so that systematic differences in the load of your machine will affect them
to the same extent.
In case the different versions require modified plumed.dat files, or if you simply want to compare
two different plumed input files that compute the same thing, you can also use multiple plumed input files:
\verbatim
plumed-runtime benchmark --kernel /path/to/lib/libplumedKernel.so:this --plumed plumed1.dat:plumed2.dat
\endverbatim
\par Output
In the output you will see the usual reports about timing produced by the internal
timers of the tested plumed instances.
In addition, this tool will monitor the timing externally, with some slightly different criterion:
- First, the initialization (construction of the input) will be shown with a separate timer
- Second, the timer corresponding to the calculation will be split in two parts, reporting
execution of the first half of the calculation and the second half.
- Finally, you might notice some discrepancy because some of the actions that are usually
not expensive are not included in the internal timers. The external timer will
thus provide a better estimate of the total elapsed time, including everything.
The internal timers are still useful to monitor what happens at the different stages
and, with \ref DEBUG `DETAILED_TIMERS`, what happens in each action.
*/
//+ENDPLUMEDOC

Expand Down

1 comment on commit f7d210b

@PlumedBot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found broken examples in automatic/ANGLES.tmp
Found broken examples in automatic/ANN.tmp
Found broken examples in automatic/AROUND.tmp
Found broken examples in automatic/CAVITY.tmp
Found broken examples in automatic/CLUSTER_DIAMETER.tmp
Found broken examples in automatic/CLUSTER_DISTRIBUTION.tmp
Found broken examples in automatic/CLUSTER_PROPERTIES.tmp
Found broken examples in automatic/CONSTANT.tmp
Found broken examples in automatic/CONTACT_MATRIX.tmp
Found broken examples in automatic/CONVERT_TO_FES.tmp
Found broken examples in automatic/COORDINATIONNUMBER.tmp
Found broken examples in automatic/DFSCLUSTERING.tmp
Found broken examples in automatic/DISTANCE_FROM_CONTOUR.tmp
Found broken examples in automatic/DUMPCUBE.tmp
Found broken examples in automatic/DUMPGRID.tmp
Found broken examples in automatic/EDS.tmp
Found broken examples in automatic/EMMI.tmp
Found broken examples in automatic/ENVIRONMENTSIMILARITY.tmp
Found broken examples in automatic/FIND_CONTOUR.tmp
Found broken examples in automatic/FIND_CONTOUR_SURFACE.tmp
Found broken examples in automatic/FIND_SPHERICAL_CONTOUR.tmp
Found broken examples in automatic/FOURIER_TRANSFORM.tmp
Found broken examples in automatic/FUNCPATHGENERAL.tmp
Found broken examples in automatic/FUNCPATHMSD.tmp
Found broken examples in automatic/FUNNEL.tmp
Found broken examples in automatic/FUNNEL_PS.tmp
Found broken examples in automatic/GHBFIX.tmp
Found broken examples in automatic/HBOND_MATRIX.tmp
Found broken examples in automatic/HISTOGRAM.tmp
Found broken examples in automatic/INCLUDE.tmp
Found broken examples in automatic/INCYLINDER.tmp
Found broken examples in automatic/INENVELOPE.tmp
Found broken examples in automatic/INSPHERE.tmp
Found broken examples in automatic/INTERPOLATE_GRID.tmp
Found broken examples in automatic/LOCAL_AVERAGE.tmp
Found broken examples in automatic/LOCAL_Q3.tmp
Found broken examples in automatic/LOCAL_Q4.tmp
Found broken examples in automatic/LOCAL_Q6.tmp
Found broken examples in automatic/MAZE_OPTIMIZER_BIAS.tmp
Found broken examples in automatic/MAZE_RANDOM_ACCELERATION_MD.tmp
Found broken examples in automatic/MAZE_SIMULATED_ANNEALING.tmp
Found broken examples in automatic/MAZE_STEERED_MD.tmp
Found broken examples in automatic/MULTICOLVARDENS.tmp
Found broken examples in automatic/OUTPUT_CLUSTER.tmp
Found broken examples in automatic/PAMM.tmp
Found broken examples in automatic/PARABETARMSD.tmp
Found broken examples in automatic/PIV.tmp
Found broken examples in automatic/PLUMED.tmp
Found broken examples in automatic/PYCVINTERFACE.tmp
Found broken examples in automatic/PYTHONFUNCTION.tmp
Found broken examples in automatic/QUATERNION.tmp
Found broken examples in automatic/REWEIGHT_BIAS.tmp
Found broken examples in automatic/REWEIGHT_METAD.tmp
Found broken examples in automatic/SPRINT.tmp
Found broken examples in automatic/TETRAHEDRALPORE.tmp
Found broken examples in automatic/TORSION.tmp
Found broken examples in automatic/TORSIONS.tmp
Found broken examples in automatic/WHAM_HISTOGRAM.tmp
Found broken examples in automatic/WHAM_WEIGHTS.tmp
Found broken examples in AnalysisPP.md
Found broken examples in CollectiveVariablesPP.md
Found broken examples in MiscelaneousPP.md

Please sign in to comment.