4 from Configuration.PyReleaseValidation.MatrixReader
import MatrixReader
5 from Configuration.PyReleaseValidation.MatrixRunner
import MatrixRunner
6 from Configuration.PyReleaseValidation.MatrixInjector
import MatrixInjector,performInjectionOptionTest
13 mrd.showRaw(opt.useInput, opt.refRel, opt.fromScratch, opt.raw, opt.step1Only, selected=opt.testList)
22 mrd.prepare(opt.useInput, opt.refRel, opt.fromScratch)
26 mrd.show(opt.testList, opt.extended, opt.cafVeto)
27 if opt.testList :
print 'testListected items:', opt.testList
29 mRunnerHi =
MatrixRunner(mrd.workFlows, opt.nProcs, opt.nThreads)
30 ret = mRunnerHi.runTests(opt)
34 print 'Cannot go on with wmagent injection with failing workflows' 36 wfInjector =
MatrixInjector(opt,mode=opt.wmcontrol,options=opt.wmoptions)
37 ret= wfInjector.prepare(mrd,
46 if __name__ ==
'__main__':
68 'jetmc': [5.1, 13, 15, 25, 38, 39],
69 'metmc' : [5.1, 15, 25, 37, 38, 39],
70 'muonmc' : [5.1, 124.4, 124.5, 20, 21, 22, 23, 25, 30],
75 usage =
'usage: runTheMatrix.py --show -s ' 77 parser = optparse.OptionParser(usage)
79 parser.add_option(
'-b',
'--batchName',
80 help=
'relval batch: suffix to be appended to Campaign name',
85 parser.add_option(
'-m',
'--memoryOffset',
86 help=
'memory of the wf for single core',
90 parser.add_option(
'--addMemPerCore',
91 help=
'increase of memory per each n > 1 core: memory(n_core) = memoryOffset + (n_core-1) * memPerCore',
95 parser.add_option(
'-j',
'--nproc',
96 help=
'number of processes. 0 Will use 4 processes, not execute anything but create the wfs',
100 parser.add_option(
'-t',
'--nThreads',
101 help=
'number of threads per process to use in cmsRun.',
106 parser.add_option(
'-n',
'--showMatrix',
107 help=
'Only show the worflows. Use --ext to show more',
112 parser.add_option(
'-e',
'--extended',
113 help=
'Show details of workflows, used with --show',
118 parser.add_option(
'-s',
'--selected',
119 help=
'Run a pre-defined selected matrix of wf. Deprecated, please use -l limited',
124 parser.add_option(
'-l',
'--list',
125 help=
'Coma separated list of workflow to be shown or ran. Possible keys are also '+
str(predefinedSet.keys())+
'. and wild card like muon, or mc',
129 parser.add_option(
'-r',
'--raw',
130 help=
'Temporary dump the .txt needed for prodAgent interface. To be discontinued soon. Argument must be the name of the set (standard, pileup,...)',
133 parser.add_option(
'-i',
'--useInput',
134 help=
'Use recyling where available. Either all, or a coma separated list of wf number.',
138 parser.add_option(
'-w',
'--what',
139 help=
'Specify the set to be used. Argument must be the name of the set (standard, pileup,...)',
143 parser.add_option(
'--step1',
144 help=
'Used with --raw. Limit the production to step1',
148 parser.add_option(
'--maxSteps',
149 help=
'Only run maximum on maxSteps. Used when we are only interested in first n steps.',
154 parser.add_option(
'--fromScratch',
155 help=
'Coma separated list of wf to be run without recycling. all is not supported as default.',
159 parser.add_option(
'--refRelease',
160 help=
'Allow to modify the recycling dataset version',
164 parser.add_option(
'--wmcontrol',
165 help=
'Create the workflows for injection to WMAgent. In the WORKING. -wmcontrol init will create the the workflows, -wmcontrol test will dryRun a test, -wmcontrol submit will submit to wmagent',
166 choices=[
'init',
'test',
'submit',
'force'],
170 parser.add_option(
'--revertDqmio',
171 help=
'When submitting workflows to wmcontrol, force DQM outout to use pool and not DQMIO',
172 choices=[
'yes',
'no'],
176 parser.add_option(
'--optionswm',
177 help=
'Specify a few things for wm injection',
180 parser.add_option(
'--keep',
181 help=
'allow to specify for which coma separated steps the output is needed',
183 parser.add_option(
'--label',
184 help=
'allow to give a special label to the output dataset name',
186 parser.add_option(
'--command',
187 help=
'provide a way to add additional command to all of the cmsDriver commands in the matrix',
191 parser.add_option(
'--apply',
192 help=
'allow to use the --command only for 1 coma separeated',
195 parser.add_option(
'--workflow',
196 help=
'define a workflow to be created or altered from the matrix',
201 parser.add_option(
'--dryRun',
202 help=
'do not run the wf at all',
207 parser.add_option(
'--testbed',
208 help=
'workflow injection to cmswebtest (you need dedicated rqmgr account)',
213 parser.add_option(
'--noCafVeto',
214 help=
'Run from any source, ignoring the CAF label',
219 parser.add_option(
'--overWrite',
220 help=
'Change the content of a step for another. List of pairs.',
224 parser.add_option(
'--noRun',
225 help=
'Remove all run list selection from wfs',
230 parser.add_option(
'--das-options',
231 help=
'Options to be passed to das_client.py.',
236 parser.add_option(
'--job-reports',
237 help=
'Dump framework job reports',
242 opt,args = parser.parse_args()
244 print 'Deprecated, please use -l limited' 245 if opt.testList: opt.testList+=
',limited' 246 else: opt.testList=
'limited' 254 opt.apply=
map(stepOrIndex,opt.apply.split(
','))
256 opt.keep=
map(stepOrIndex,opt.keep.split(
','))
262 for entry
in opt.testList.split(
','):
263 if not entry:
continue 265 for k
in predefinedSet:
266 if k.lower().startswith(entry.lower())
or k.lower().endswith(entry.lower()):
267 testList.extend(predefinedSet[k])
272 testList.append(
float(entry))
274 print entry,
'is not a possible selected entry' 276 opt.testList =
list(set(testList))
279 if opt.useInput: opt.useInput = opt.useInput.split(
',')
280 if opt.fromScratch: opt.fromScratch = opt.fromScratch.split(
',')
281 if opt.nProcs: opt.nProcs=
int(opt.nProcs)
282 if opt.nThreads: opt.nThreads=
int(opt.nThreads)
283 if (opt.memoryOffset): opt.memoryOffset=
int(opt.memoryOffset)
284 if (opt.memPerCore): opt.memPerCore=
int(opt.memPerCore)
289 opt.overWrite=eval(opt.overWrite)
291 if opt.raw
and opt.show:
def performInjectionOptionTest(opt)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run