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.
Requirements
Section titled “Requirements”-
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-probeThis 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.
Profile a run
Section titled “Profile a run”- Press Run and turn on Enable profiling.
- Start the run. One verlet-probe per rank samples 99 times a second, up to 100 seconds per region.
- When the run finishes, open the Profiling tab.
Profile just the part you care about
Section titled “Profile just the part you care about”Mark regions in the input with comments:
fix 1 all nvt temp 300.0 300.0 100.0run 10000 # equilibration, not profiled
# verlet-probe start productionrun 100000# verlet-probe stopEach start opens a labelled region with its own profile. Without markers, one profile covers the
whole run.
Reading a profile
Section titled “Reading a profile”| View | Shows |
|---|---|
| Flame graph | Every call path, widest where the most time went. Click to zoom. |
| Hotspots | Functions ranked by own time and by total time including callees. |
| By source file | Time grouped by source file, which usually maps to a style or package. |
| Hot lines | The 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.