160 global _outputdir, _reqnumber
161 print "Commands received running perfsuite for these jobs:" 174 topdir = os.path.join(_outputdir,
"request_" +
str(_reqnumber))
175 exists = os.path.exists(topdir)
180 curperfdir = os.path.abspath(os.path.join(topdir,
str(cmd_num)))
181 if not os.path.exists(curperfdir):
183 logfile = os.path.join(curperfdir,
"cmsPerfSuite.log")
184 if os.path.exists(logfile):
185 logfile = logfile +
str(cmd_num)
188 if cmd[
'cpus'] ==
"All":
189 print "Running performance suite on all CPUS!\n" 192 cmd[
"cpus"]=cmd[
"cpus"]+
str(cpu)+
"," 193 cmd[
"cpus"]=cmd[
"cpus"][:-1]
194 print "I.e. on cpus %s\n"%cmd[
"cpus"]
199 cmdwdefs[
"perfsuitedir" ] = curperfdir
200 cmdwdefs[
"TimeSizeEvents" ] =
getCPSkeyword(
"TimeSizeEvents" , cmd)
201 cmdwdefs[
"TimeSizeCandles" ] =
getCPSkeyword(
"TimeSizeCandles" , cmd)
202 cmdwdefs[
"TimeSizePUCandles" ] =
getCPSkeyword(
"TimeSizePUCandles" , cmd)
203 cmdwdefs[
"IgProfEvents" ] =
getCPSkeyword(
"IgProfEvents" , cmd)
204 cmdwdefs[
"IgProfCandles" ] =
getCPSkeyword(
"IgProfCandles" , cmd)
205 cmdwdefs[
"IgProfPUCandles" ] =
getCPSkeyword(
"IgProfPUCandles" , cmd)
206 cmdwdefs[
"CallgrindEvents" ] =
getCPSkeyword(
"CallgrindEvents" , cmd)
207 cmdwdefs[
"CallgrindCandles"] =
getCPSkeyword(
"CallgrindCandles" , cmd)
208 cmdwdefs[
"CallgrindPUCandles"] =
getCPSkeyword(
"CallgrindPUCandles" , cmd)
209 cmdwdefs[
"MemcheckEvents" ] =
getCPSkeyword(
"MemcheckEvents" , cmd)
210 cmdwdefs[
"MemcheckCandles" ] =
getCPSkeyword(
"MemcheckCandles" , cmd)
211 cmdwdefs[
"MemcheckPUCandles" ] =
getCPSkeyword(
"MemcheckPUCandles" , cmd)
213 cmdwdefs[
"cmsScimarkLarge" ] =
getCPSkeyword(
"cmsScimarkLarge" , cmd)
214 cmdwdefs[
"cmsdriverOptions"] =
getCPSkeyword(
"cmsdriverOptions", cmd)
215 cmdwdefs[
"stepOptions" ] =
getCPSkeyword(
"stepOptions" , cmd)
225 cmdwdefs[
"logfile" ] = logfile
226 logh = open(logfile,
"w")
227 logh.write(
"This perfsuite run was configured with the following options:\n")
229 for key
in cmdwdefs.keys():
230 logh.write(key +
"\t" +
str(cmdwdefs[key])+
"\n")
232 print "Calling cmsPerfSuite.main() function\n" 235 "-t",cmdwdefs[
"TimeSizeEvents" ],
236 "--RunTimeSize",cmdwdefs[
"TimeSizeCandles"],
237 "-o",cmdwdefs[
"perfsuitedir" ],
244 "--cmsScimark",cmdwdefs[
"cmsScimark" ],
245 "--cmsScimarkLarge",cmdwdefs[
"cmsScimarkLarge" ],
246 "--cmsdriver",cmdwdefs[
"cmsdriverOptions"],
247 "--step",cmdwdefs[
"stepOptions" ],
250 "--cpu",cmdwdefs[
"cpus" ],
251 "--cores",cmdwdefs[
"cores" ],
259 cps.main(cpsInputArgs)
260 print "Running of the Performance Suite is done!" 266 outs.append((cmdwdefs,cph.harvest(curperfdir)))
272 except exceptions.Exception
as detail:
274 logh = open(os.path.join(os.getcwd(),
"error.log"),
"a")
275 logh.write(
str(detail) +
"\n")
def request_benchmark(cmds)
def getCPSkeyword(key, dict)