Skip to content

Callgrindmetrics

Stefan Roiser requested to merge callgrindmetrics into master

New metrics to be added to PR2, extracted from callgrind log files, before calling the CallgrindHandler, the following commands need to be executed.

#!/bin/sh

valgrindroot=/cvmfs/lhcbdev.cern.ch/tools/valgrind/3.12.0/x86_64-centos7
export PATH=${valgrindroot}/bin:${PATH}
export LD_LIBRARY_PATH=${valgrindroot}/lib/valgrind:${LD_LIBRARY_PATH}

# make sure no log files from previous runs are kept
rm -f callgrind.out.* *.log *.csv *.root

# remove these two lines once https://gitlab.cern.ch/lhcb/Brunel/merge_requests/169 is merged
lb-run --nightly-cvmfs --nightly=lhcb-future Brunel/future gaudirun.py --printsequence ./MiniBrunelHLT1.py | tee gaudi-sequence.log
lb-run --nightly-cvmfs --nightly=lhcb-future Brunel/future valgrind --tool=callgrind --dump-instr=yes --instr-atstart=no --cache-sim=yes --branch-sim=yes python $(lb-run --nightly-cvmfs --nightly=lhcb-future Brunel/future which gaudirun.py) ./MiniBrunelHLT1.py | tee gaudi-minibrunel.log

# uncomment these two lines once https://gitlab.cern.ch/lhcb/Brunel/merge_requests/169 is merged
#lb-run --nightly-cvmfs --nightly=lhcb-future Brunel/future gaudirun.py --printsequence ${BRUNEL_PROJECT_ROOT}/Rec/Brunel/options/MiniBrunelHLT1.py > gaudi-sequence.log
#lb-run --nightly-cvmfs --nightly=lhcb-future Brunel/future valgrind --tool=callgrind --dump-instr=yes --instr-atstart=no --cache-sim=yes --branch-sim=yes python $(lb-run --nightly-cvmfs --nightly=lhcb-future Brunel/future which gaudirun.py) ${BRUNEL_PROJECT_ROOT}/Rec/Brunel/options/MiniBrunelHLT1.py | tee gaudi-minibrunel.log

callgrind_log=`ls -tr callgrind.out.*.1 | tail -1`
callgrind_annotate --inclusive=yes ${callgrind_log} > ${callgrind_log}.anno

Note this merge request depends on having lhcb/Brunel!169 (merged) merged in Brunel, remove the third and uncomment the fourth paragraph once the merge request is done.

As long as this merge request is not in, one can use a local options file with

from Configurables import MiniBrunel
mbrunel = MiniBrunel()
mbrunel.EvtMax = 20
mbrunel.MaxAlgosInFlight = 2
mbrunel.ThreadPoolSize = 2
mbrunel.EventSlots = 2
mbrunel.Profile = True
mbrunel.HLT1Only = True
mbrunel.EnableHive = True

Merge request reports

Loading