Some small hints for profiling utilities used on Linux systems.
gmon and gperf hints
compile with
-pgin bothCFLAGS/CXXFLAGSandLDFLAGSuse env variable
GMON_OUT_PREFIXto make programs output to$GMON_OUT_PREFIX.$pidinstead ofgmon.outdespite warnings, usable on multithreaded programs (all threads' times are added up), even if you can’t tell individual threads apart
using linux’s perf
record:
perf record -g [-o outputfile] programview data:
perf report [-i inputfile]
When a program is running with MPI, its rank is stored in the $PMI_RANK env
variable.