Skip to content
Laksono Adhianto edited this page Aug 11, 2022 · 5 revisions

HPCToolkit Usage

hpcrun

  • Specify output directory
 hpcrun -o <measurements-dir>
  • List supported events (hundreds of CPU events)
 hpcrun -L
  • GPU profiling
 hpcrun -e gpu=xxx <app> .... // xxx ∈ {nvidia,amd,opencl,level0}
  • GPU tracing (-t)
 hpcrun -e gpu=yyy -t <app> // yyy ∈ {nvidia,amd,opencl}
  • GPU PC sampling (NVIDIA only)
 hpcrun -e gpu=nvidia,pc <app>
  • CPU and GPU profiling and tracing
 hpcrun -e REALTIME -e gpu=yyy -t <app>
  • Use hpcrun with job launchers
 jsrun -n 32 -g 1 -a 1 hpcrun -e gpu=xxx <app>
 srun -n 1 -G 1 hpcrun -e gpu=xxx <app>
 aprun -n 16 -N 8 -d 8 hpcrun -e gpu=xxx <app>

hpcstruct

  • Recommend: set HPCTOOLKIT_HPCSTRUCT_CACHE to store the analyzed binaries
 export HPCTOOLKIT_HPCSTRUCT_CACHE=<directory>
  • Analyze the binary of executables and its dependent libraries
hpcstruct <measurement_dir>
  • Parse GPU CFG to recover loop structures and device calling context
 hpcstruct --gpucfg yes <measurements-dir>

hpcprof

Combine measurements with program structure information and generate a database

hpcprof -o <database_dir> <measurement_dir>
Clone this wiki locally