Skip to content

Commit 1ab5f61

Browse files
authored
Merge pull request #1596 from jpata/igprof_order
reco release profiling: run igprof after everything else
2 parents 0fb4350 + c4feede commit 1ab5f61

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

reco_profiling/profileRunner.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,18 @@ def configureProfilingSteps(cmsdriver_lines, num_events):
9898
step4 + " &> step4.log"
9999
]
100100

101-
#add step3 profiling
101+
#add step3 and step4 basic profiles
102102
new_cmdlist += [
103103
echoBefore(step3_tmi, "step3 TimeMemoryInfo"),
104104
echoBefore(step3_ft, "step3 FastTimer"),
105105
echoBefore(step3_ig, "step3 IgProf conf"),
106+
echoBefore(step4_tmi, "step4 TimeMemoryInfo"),
107+
echoBefore(step4_ft, "step4 FastTimer"),
108+
echoBefore(step4_ig, "step4 IgProf conf"),
109+
]
110+
111+
#add step3 igprof profiling
112+
new_cmdlist += [
106113
echoBefore(igprof_s3_pp, "step3 IgProf pp"),
107114
"mv IgProf.1.gz step3_igprofCPU.1.gz",
108115
"mv IgProf.{nev}.gz step3_igprofCPU.{nev}.gz".format(nev=int(num_events/2)),
@@ -112,11 +119,8 @@ def configureProfilingSteps(cmsdriver_lines, num_events):
112119
"mv IgProf.{nev}.gz step3_igprofMEM.{nev}.gz".format(nev=int(num_events/2)),
113120
"mv IgProf.{nev}.gz step3_igprofMEM.{nev}.gz".format(nev=int(num_events-1)),
114121
]
115-
#add step4 profiling
122+
#add step4 igprof profiling
116123
new_cmdlist += [
117-
echoBefore(step4_tmi, "step4 TimeMemoryInfo"),
118-
echoBefore(step4_ft, "step4 FastTimer"),
119-
echoBefore(step4_ig, "step4 IgProf conf"),
120124
echoBefore(igprof_s4_pp, "step4 IgProf pp"),
121125
"mv IgProf.1.gz step4_igprofCPU.1.gz",
122126
"mv IgProf.{nev}.gz step4_igprofCPU.{nev}.gz".format(nev=int(num_events/2)),
@@ -135,8 +139,8 @@ def writeProfilingScript(wfdir, runscript, cmdlist):
135139
fi.write("#!/bin/bash\n")
136140
fi.write("ulimit -a\n")
137141

138-
#abort on error
139-
fi.write("set -e\n")
142+
#don't abort on error
143+
#fi.write("set -e\n")
140144

141145
#print commands verbosely
142146
fi.write("set -x\n")
@@ -168,12 +172,12 @@ def copyProfilingOutputs(wfdir, out_dir, num_events):
168172
"step4.log",
169173
"step3_TimeMemoryInfo.log",
170174
"step3_circles.json",
175+
"step4_TimeMemoryInfo.log",
176+
"step4_circles.json",
171177
"step3_igprofCPU.gz",
172178
"step3_igprofMEM.1.gz",
173179
"step3_igprofMEM.{}.gz".format(int(num_events-1)),
174180
"step3_igprofMEM.{}.gz".format(int(num_events/2)),
175-
"step4_TimeMemoryInfo.log",
176-
"step4_circles.json",
177181
"step4_igprofCPU.gz",
178182
"step4_igprofMEM.1.gz",
179183
"step4_igprofMEM.{}.gz".format(int(num_events-1)),
@@ -186,7 +190,7 @@ def copyProfilingOutputs(wfdir, out_dir, num_events):
186190
print("copying {} to {}".format(path, out_dir))
187191
shutil.copy(path, out_dir)
188192
else:
189-
raise Exception("Output {} not found or is broken".format(path))
193+
print("ERROR: Output {} not found or is broken, skipping".format(path))
190194
return
191195

192196
def main(wf, num_events, out_dir):

0 commit comments

Comments
 (0)