Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions reco_profiling/profileRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,18 @@ def configureProfilingSteps(cmsdriver_lines, num_events):
step4 + " &> step4.log"
]

#add step3 profiling
#add step3 and step4 basic profiles
new_cmdlist += [
echoBefore(step3_tmi, "step3 TimeMemoryInfo"),
echoBefore(step3_ft, "step3 FastTimer"),
echoBefore(step3_ig, "step3 IgProf conf"),
echoBefore(step4_tmi, "step4 TimeMemoryInfo"),
echoBefore(step4_ft, "step4 FastTimer"),
echoBefore(step4_ig, "step4 IgProf conf"),
]

#add step3 igprof profiling
new_cmdlist += [
echoBefore(igprof_s3_pp, "step3 IgProf pp"),
"mv IgProf.1.gz step3_igprofCPU.1.gz",
"mv IgProf.{nev}.gz step3_igprofCPU.{nev}.gz".format(nev=int(num_events/2)),
Expand All @@ -112,11 +119,8 @@ def configureProfilingSteps(cmsdriver_lines, num_events):
"mv IgProf.{nev}.gz step3_igprofMEM.{nev}.gz".format(nev=int(num_events/2)),
"mv IgProf.{nev}.gz step3_igprofMEM.{nev}.gz".format(nev=int(num_events-1)),
]
#add step4 profiling
#add step4 igprof profiling
new_cmdlist += [
echoBefore(step4_tmi, "step4 TimeMemoryInfo"),
echoBefore(step4_ft, "step4 FastTimer"),
echoBefore(step4_ig, "step4 IgProf conf"),
echoBefore(igprof_s4_pp, "step4 IgProf pp"),
"mv IgProf.1.gz step4_igprofCPU.1.gz",
"mv IgProf.{nev}.gz step4_igprofCPU.{nev}.gz".format(nev=int(num_events/2)),
Expand All @@ -135,8 +139,8 @@ def writeProfilingScript(wfdir, runscript, cmdlist):
fi.write("#!/bin/bash\n")
fi.write("ulimit -a\n")

#abort on error
fi.write("set -e\n")
#don't abort on error
#fi.write("set -e\n")

#print commands verbosely
fi.write("set -x\n")
Expand Down Expand Up @@ -168,12 +172,12 @@ def copyProfilingOutputs(wfdir, out_dir, num_events):
"step4.log",
"step3_TimeMemoryInfo.log",
"step3_circles.json",
"step4_TimeMemoryInfo.log",
"step4_circles.json",
"step3_igprofCPU.gz",
"step3_igprofMEM.1.gz",
"step3_igprofMEM.{}.gz".format(int(num_events-1)),
"step3_igprofMEM.{}.gz".format(int(num_events/2)),
"step4_TimeMemoryInfo.log",
"step4_circles.json",
"step4_igprofCPU.gz",
"step4_igprofMEM.1.gz",
"step4_igprofMEM.{}.gz".format(int(num_events-1)),
Expand All @@ -186,7 +190,7 @@ def copyProfilingOutputs(wfdir, out_dir, num_events):
print("copying {} to {}".format(path, out_dir))
shutil.copy(path, out_dir)
else:
raise Exception("Output {} not found or is broken".format(path))
print("ERROR: Output {} not found or is broken, skipping".format(path))
return

def main(wf, num_events, out_dir):
Expand Down