Skip to content

Profile a run

verlet-probe samples a running simulation with eBPF, without recompiling the engine and with little overhead. verlet merges the samples from every MPI rank into one picture.

  • Linux. eBPF is a Linux kernel feature; macOS and Windows runs cannot be profiled.

  • verlet-probe on the machine, with three capabilities granted once:

    Terminal window
    sudo setcap cap_bpf,cap_perfmon,cap_sys_resource+ep /path/to/verlet-probe

    This is the only step in verlet that needs an administrator, and only for profiles. On your own Linux computer the app brings verlet-probe; elsewhere, put it on the PATH.

Enable profiling in the Run sheet is available when the environment’s scan found verlet-probe.

  1. Press Run and turn on Enable profiling.
  2. Start the run. One verlet-probe per rank samples 99 times a second, up to 100 seconds per region.
  3. When the run finishes, open the Profiling tab.
A flame graph merged across every MPI rankA flame graph merged across every MPI rank

Mark regions in the input with comments:

fix 1 all nvt temp 300.0 300.0 100.0
run 10000 # equilibration, not profiled
# verlet-probe start production
run 100000
# verlet-probe stop

Each start opens a labelled region with its own profile. Without markers, one profile covers the whole run.

ViewShows
Flame graphEvery call path, widest where the most time went. Click to zoom.
HotspotsFunctions ranked by own time and by total time including callees.
By source fileTime grouped by source file, which usually maps to a style or package.
Hot linesThe source lines with the most samples, when the binary has line information.

In an LJ melt you would expect the pair compute and the neighbor build near the top. If communication dominates, the run likely uses too many ranks for its size.