1 from __future__
import print_function
10 MAXWORKFLOWLENGTH = 81
14 print(
'Not injecting to wmagent in --show mode. Need to run the worklfows.')
16 if opt.wmcontrol==
'init':
19 if opt.wmcontrol==
'test':
22 if opt.wmcontrol==
'submit' and opt.nProcs==0:
23 print(
'Not injecting to wmagent in -j 0 mode. Need to run the worklfows.')
25 if opt.wmcontrol==
'force':
26 print(
"This is an expert setting, you'd better know what you're doing")
30 from modules.wma
import upload_to_couch
31 (filePath,labelInCouch,user,group,where) = arguments
32 cacheId=upload_to_couch(filePath,
48 for k
in options.split(
','):
49 if k.startswith(
'dqm:'):
50 self.
dqmgui=k.split(
':',1)[-1]
51 elif k.startswith(
'wma:'):
54 self.
testMode=((mode!=
'submit')
and (mode!=
'force'))
84 self.
wmagent = os.getenv(
'WMAGENT_REQMGR')
91 self.
wmagent =
'cmsweb-testbed.cern.ch' 94 if opt.dbsUrl
is not None:
96 elif os.getenv(
'CMS_DBSREADER_URL')
is not None:
97 self.
DbsUrl = os.getenv(
'CMS_DBSREADER_URL')
101 self.
DbsUrl =
"https://cmsweb-prod.cern.ch/dbs/prod/global/DBSReader" 103 self.
DbsUrl =
"https://cmsweb-testbed.cern.ch/dbs/int/global/DBSReader" 106 self.
dqmgui=
"https://cmsweb.cern.ch/dqm/relval" 119 if not os.getenv(
'WMCORE_ROOT'):
120 print(
'\n\twmclient is not setup properly. Will not be able to upload or submit requests.\n')
125 print(
'\n\tFound wmclient\n')
128 "RequestType" :
"TaskChain",
129 "SubRequestType" :
"RelVal",
130 "RequestPriority": 500000,
131 "Requestor": self.
user,
133 "CMSSWVersion": os.getenv(
'CMSSW_VERSION'),
134 "Campaign": os.getenv(
'CMSSW_VERSION'),
135 "ScramArch": os.getenv(
'SCRAM_ARCH'),
136 "ProcessingVersion": self.
version,
138 "ConfigCacheUrl": self.
couch,
146 "SizePerEvent" : 1234,
148 "PrepID": os.getenv(
'CMSSW_VERSION')
152 "EnableHarvesting" :
"True",
153 "DQMUploadUrl" : self.
dqmgui,
154 "DQMConfigCacheID" :
None,
160 "ConfigCacheID" :
None,
162 "SplittingAlgo" :
"EventBased",
163 "EventsPerJob" :
None,
164 "EventsPerLumi" :
None,
165 "RequestNumEvents" :
None,
166 "Seeding" :
"AutomaticSeeding",
167 "PrimaryDataset" :
None,
169 "Multicore" : opt.nThreads,
174 "TaskName" :
"DigiHLT",
175 "ConfigCacheID" :
None,
177 "InputDataset" :
None,
178 "SplittingAlgo" :
"LumiBased",
181 "Multicore" : opt.nThreads,
188 "InputFromOutputModule" :
None,
189 "ConfigCacheID" :
None,
191 "SplittingAlgo" :
"LumiBased",
194 "Multicore" : opt.nThreads,
196 "KeepOutput" :
False,
197 "RequiresGPU" :
None,
214 Return a "wmsplit" dictionary that contain non-default LumisPerJob values 218 wmsplit[
'DIGIHI'] = 5
219 wmsplit[
'RECOHI'] = 5
221 wmsplit[
'RECODreHLT'] = 2
222 wmsplit[
'DIGIPU'] = 4
223 wmsplit[
'DIGIPU1'] = 4
224 wmsplit[
'RECOPU1'] = 1
225 wmsplit[
'DIGIUP15_PU50'] = 1
226 wmsplit[
'RECOUP15_PU50'] = 1
227 wmsplit[
'DIGIUP15_PU25'] = 1
228 wmsplit[
'RECOUP15_PU25'] = 1
229 wmsplit[
'DIGIUP15_PU25HS'] = 1
230 wmsplit[
'RECOUP15_PU25HS'] = 1
231 wmsplit[
'DIGIHIMIX'] = 5
232 wmsplit[
'RECOHIMIX'] = 5
233 wmsplit[
'RECODSplit'] = 1
234 wmsplit[
'SingleMuPt10_UP15_ID'] = 1
235 wmsplit[
'DIGIUP15_ID'] = 1
236 wmsplit[
'RECOUP15_ID'] = 1
237 wmsplit[
'TTbar_13_ID'] = 1
238 wmsplit[
'SingleMuPt10FS_ID'] = 1
239 wmsplit[
'TTbarFS_ID'] = 1
240 wmsplit[
'RECODR2_50nsreHLT'] = 5
241 wmsplit[
'RECODR2_25nsreHLT'] = 5
242 wmsplit[
'RECODR2_2016reHLT'] = 5
243 wmsplit[
'RECODR2_50nsreHLT_HIPM'] = 5
244 wmsplit[
'RECODR2_25nsreHLT_HIPM'] = 5
245 wmsplit[
'RECODR2_2016reHLT_HIPM'] = 1
246 wmsplit[
'RECODR2_2016reHLT_skimSingleMu'] = 1
247 wmsplit[
'RECODR2_2016reHLT_skimDoubleEG'] = 1
248 wmsplit[
'RECODR2_2016reHLT_skimMuonEG'] = 1
249 wmsplit[
'RECODR2_2016reHLT_skimJetHT'] = 1
250 wmsplit[
'RECODR2_2016reHLT_skimMET'] = 1
251 wmsplit[
'RECODR2_2016reHLT_skimSinglePh'] = 1
252 wmsplit[
'RECODR2_2016reHLT_skimMuOnia'] = 1
253 wmsplit[
'RECODR2_2016reHLT_skimSingleMu_HIPM'] = 1
254 wmsplit[
'RECODR2_2016reHLT_skimDoubleEG_HIPM'] = 1
255 wmsplit[
'RECODR2_2016reHLT_skimMuonEG_HIPM'] = 1
256 wmsplit[
'RECODR2_2016reHLT_skimJetHT_HIPM'] = 1
257 wmsplit[
'RECODR2_2016reHLT_skimMET_HIPM'] = 1
258 wmsplit[
'RECODR2_2016reHLT_skimSinglePh_HIPM'] = 1
259 wmsplit[
'RECODR2_2016reHLT_skimMuOnia_HIPM'] = 1
260 wmsplit[
'RECODR2_2017reHLT_Prompt'] = 1
261 wmsplit[
'RECODR2_2017reHLT_skimSingleMu_Prompt_Lumi'] = 1
262 wmsplit[
'RECODR2_2017reHLT_skimDoubleEG_Prompt'] = 1
263 wmsplit[
'RECODR2_2017reHLT_skimMET_Prompt'] = 1
264 wmsplit[
'RECODR2_2017reHLT_skimMuOnia_Prompt'] = 1
265 wmsplit[
'RECODR2_2017reHLT_Prompt_L1TEgDQM'] = 1
266 wmsplit[
'RECODR2_2018reHLT_Prompt'] = 1
267 wmsplit[
'RECODR2_2018reHLT_skimSingleMu_Prompt_Lumi'] = 1
268 wmsplit[
'RECODR2_2018reHLT_skimDoubleEG_Prompt'] = 1
269 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Prompt'] = 1
270 wmsplit[
'RECODR2_2018reHLT_skimMET_Prompt'] = 1
271 wmsplit[
'RECODR2_2018reHLT_skimMuOnia_Prompt'] = 1
272 wmsplit[
'RECODR2_2018reHLT_skimEGamma_Prompt_L1TEgDQM'] = 1
273 wmsplit[
'RECODR2_2018reHLT_skimMuonEG_Prompt'] = 1
274 wmsplit[
'RECODR2_2018reHLT_skimCharmonium_Prompt'] = 1
275 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Prompt_HEfail'] = 1
276 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Prompt_BadHcalMitig'] = 1
277 wmsplit[
'RECODR2_2018reHLTAlCaTkCosmics_Prompt'] = 1
278 wmsplit[
'RECODR2_2018reHLT_skimDisplacedJet_Prompt'] = 1
279 wmsplit[
'RECODR2_2018reHLT_ZBPrompt'] = 1
280 wmsplit[
'RECODR2_2018reHLT_Offline'] = 1
281 wmsplit[
'RECODR2_2018reHLT_skimSingleMu_Offline_Lumi'] = 1
282 wmsplit[
'RECODR2_2018reHLT_skimDoubleEG_Offline'] = 1
283 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Offline'] = 1
284 wmsplit[
'RECODR2_2018reHLT_skimMET_Offline'] = 1
285 wmsplit[
'RECODR2_2018reHLT_skimMuOnia_Offline'] = 1
286 wmsplit[
'RECODR2_2018reHLT_skimEGamma_Offline_L1TEgDQM'] = 1
287 wmsplit[
'RECODR2_2018reHLT_skimMuonEG_Offline'] = 1
288 wmsplit[
'RECODR2_2018reHLT_skimCharmonium_Offline'] = 1
289 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Offline_HEfail'] = 1
290 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Offline_BadHcalMitig'] = 1
291 wmsplit[
'RECODR2_2018reHLTAlCaTkCosmics_Offline'] = 1
292 wmsplit[
'RECODR2_2018reHLT_skimDisplacedJet_Offline'] = 1
293 wmsplit[
'RECODR2_2018reHLT_ZBOffline'] = 1
294 wmsplit[
'HLTDR2_50ns'] = 1
295 wmsplit[
'HLTDR2_25ns'] = 1
296 wmsplit[
'HLTDR2_2016'] = 1
297 wmsplit[
'HLTDR2_2017'] = 1
298 wmsplit[
'HLTDR2_2018'] = 1
299 wmsplit[
'HLTDR2_2018_BadHcalMitig'] = 1
300 wmsplit[
'Hadronizer'] = 1
301 wmsplit[
'DIGIUP15'] = 1
302 wmsplit[
'RECOUP15'] = 1
303 wmsplit[
'RECOAODUP15'] = 5
304 wmsplit[
'DBLMINIAODMCUP15NODQM'] = 5
307 wmsplit[
'DigiPU'] = 1
308 wmsplit[
'RecoPU'] = 1
309 wmsplit[
'RECOHID11'] = 1
310 wmsplit[
'DIGIUP17'] = 1
311 wmsplit[
'RECOUP17'] = 1
312 wmsplit[
'DIGIUP17_PU25'] = 1
313 wmsplit[
'RECOUP17_PU25'] = 1
314 wmsplit[
'DIGICOS_UP16'] = 1
315 wmsplit[
'RECOCOS_UP16'] = 1
316 wmsplit[
'DIGICOS_UP17'] = 1
317 wmsplit[
'RECOCOS_UP17'] = 1
318 wmsplit[
'DIGICOS_UP18'] = 1
319 wmsplit[
'RECOCOS_UP18'] = 1
320 wmsplit[
'DIGICOS_UP21'] = 1
321 wmsplit[
'RECOCOS_UP21'] = 1
322 wmsplit[
'HYBRIDRepackHI2015VR'] = 1
323 wmsplit[
'HYBRIDZSHI2015'] = 1
324 wmsplit[
'RECOHID15'] = 1
325 wmsplit[
'RECOHID18'] = 1
326 wmsplit[
'HLTDR3_2023'] = 1
327 wmsplit[
'RECONANORUN3_reHLT'] = 1
328 wmsplit[
'HARVESTRUN3'] = 1
330 from .upgradeWorkflowComponents
import upgradeKeys
331 for key
in upgradeKeys[2026]:
335 wmsplit[
'DigiTriggerPU_' + key] = 1
336 wmsplit[
'RecoGlobalPU_' + key] = 1
338 except Exception
as ex:
339 print(
'Exception while building a wmsplit dictionary: %s' % (
str(ex)))
344 def prepare(self, mReader, directories, mode='init'):
345 wmsplit = MatrixInjector.get_wmsplit()
347 for (n,dir)
in directories.items():
349 print(
"inspecting",dir)
351 for (x,s)
in mReader.workFlowSteps.items():
361 if len( [step
for step
in s[3]
if "HARVESTGEN" in step] )>0:
362 chainDict[
'TimePerEvent']=0.01
363 thisLabel=thisLabel+
"_gen" 365 if len( [step
for step
in s[3]
if "DBLMINIAODMCUP15NODQM" in step] )>0:
366 thisLabel=thisLabel+
"_dblMiniAOD" 372 if 'INPUT' in step
or (
not isinstance(s[2][index],str)):
373 nextHasDSInput=s[2][index]
381 chainDict[
'nowmTasklist'][-1][
'nowmIO']=json.loads(open(
'%s/%s.io'%(dir,step)).
read())
383 print(
"Failed to find",
'%s/%s.io'%(dir,step),
".The workflows were probably not run on cfg not created")
386 chainDict[
'nowmTasklist'][-1][
'PrimaryDataset']=
'RelVal'+s[1].
split(
'+')[0]
387 if not '--relval' in s[2][index]:
388 print(
'Impossible to create task from scratch without splitting information with --relval')
391 arg=s[2][index].
split()
392 ns=list(
map(int,arg[len(arg) - arg[-1::-1].
index(
'--relval')].
split(
',')))
393 chainDict[
'nowmTasklist'][-1][
'RequestNumEvents'] = ns[0]
394 chainDict[
'nowmTasklist'][-1][
'EventsPerJob'] = ns[1]
395 chainDict[
'nowmTasklist'][-1][
'EventsPerLumi'] = ns[1]
397 if 'numberEventsInLuminosityBlock' in s[2][index]:
398 nEventsInLuminosityBlock = re.findall(
'process.source.numberEventsInLuminosityBlock=cms.untracked.uint32\(([ 0-9 ]*)\)', s[2][index],re.DOTALL)
399 if nEventsInLuminosityBlock[-1].isdigit()
and int(nEventsInLuminosityBlock[-1]) < ns[1]:
400 chainDict[
'nowmTasklist'][-1][
'EventsPerLumi'] =
int(nEventsInLuminosityBlock[-1])
403 if 'FASTSIM' in s[2][index]
or '--fast' in s[2][index]:
404 thisLabel+=
'_FastSim' 405 if 'lhe' in s[2][index]
in s[2][index]:
406 chainDict[
'nowmTasklist'][-1][
'LheInputFiles'] =
True 411 chainDict[
'nowmTasklist'][-1][
'nowmIO']=json.loads(open(
'%s/%s.io'%(dir,step)).
read())
413 print(
"Failed to find",
'%s/%s.io'%(dir,step),
".The workflows were probably not run on cfg not created")
415 chainDict[
'nowmTasklist'][-1][
'InputDataset']=nextHasDSInput.dataSet
416 if (
'DQMHLTonRAWAOD' in step) :
417 chainDict[
'nowmTasklist'][-1][
'IncludeParents']=
True 418 splitForThisWf=nextHasDSInput.split
419 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=splitForThisWf
421 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=wmsplit[step]
423 if len(nextHasDSInput.run):
424 chainDict[
'nowmTasklist'][-1][
'RunWhitelist']=nextHasDSInput.run
425 if len(nextHasDSInput.ls):
426 chainDict[
'nowmTasklist'][-1][
'LumiList']=nextHasDSInput.ls
428 if '--data' in s[2][index]
and nextHasDSInput.label:
429 thisLabel+=
'_RelVal_%s'%nextHasDSInput.label
430 if 'filter' in chainDict[
'nowmTasklist'][-1][
'nowmIO']:
431 print(
"This has an input DS and a filter sequence: very likely to be the PyQuen sample")
432 processStrPrefix=
'PU_' 433 setPrimaryDs =
'RelVal'+s[1].
split(
'+')[0]
435 chainDict[
'nowmTasklist'][-1][
'PrimaryDataset']=setPrimaryDs
437 if 'GPU' in step
and self.
RequiresGPU !=
'forbidden':
438 chainDict[
'nowmTasklist'][-1][
'RequiresGPU'] = self.
RequiresGPU 439 chainDict[
'nowmTasklist'][-1][
'GPUParams']=json.dumps(self.
defaultGPUParams)
444 chainDict[
'nowmTasklist'][-1][
'nowmIO']=json.loads(open(
'%s/%s.io'%(dir,step)).
read())
446 print(
"Failed to find",
'%s/%s.io'%(dir,step),
".The workflows were probably not run on cfg not created")
449 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=splitForThisWf
451 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=wmsplit[step]
452 if 'GPU' in step
and self.
RequiresGPU !=
'forbidden':
453 chainDict[
'nowmTasklist'][-1][
'RequiresGPU'] = self.
RequiresGPU 454 chainDict[
'nowmTasklist'][-1][
'GPUParams']=json.dumps(self.
defaultGPUParams)
457 if 'Hadronizer' in step:
458 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=wmsplit[
'Hadronizer']
461 chainDict[
'nowmTasklist'][-1][
'TaskName']=step
463 chainDict[
'nowmTasklist'][-1][
'PrimaryDataset']=setPrimaryDs
464 chainDict[
'nowmTasklist'][-1][
'ConfigCacheID']=
'%s/%s.py'%(dir,step)
465 chainDict[
'nowmTasklist'][-1][
'GlobalTag']=chainDict[
'nowmTasklist'][-1][
'nowmIO'][
'GT']
466 chainDict[
'GlobalTag']=chainDict[
'nowmTasklist'][-1][
'nowmIO'][
'GT']
467 if 'NANOEDM' in step :
468 nanoedmGT = chainDict[
'nowmTasklist'][-1][
'nowmIO'][
'GT']
469 if 'NANOMERGE' in step :
470 chainDict[
'GlobalTag'] = nanoedmGT
471 if 'pileup' in chainDict[
'nowmTasklist'][-1][
'nowmIO']:
472 chainDict[
'nowmTasklist'][-1][
'MCPileup']=chainDict[
'nowmTasklist'][-1][
'nowmIO'][
'pileup']
473 if '--pileup ' in s[2][index]:
474 pileupString = s[2][index].
split()[s[2][index].
split().
index(
'--pileup')+1]
475 processStrPrefix=
'PU_' 476 if pileupString.find(
'25ns') > 0 :
477 processStrPrefix=
'PU25ns_' 478 elif pileupString.find(
'50ns') > 0 :
479 processStrPrefix=
'PU50ns_' 480 elif 'nopu' in pileupString.lower():
482 if 'premix_stage2' in s[2][index]
and '--pileup_input' in s[2][index]:
484 processStrPrefix=
'PUpmx25ns_' 485 elif s[2][index].
split()[ s[2][index].
split().
index(
'--pileup_input')+1 ].
find(
'50ns') > 0 :
486 processStrPrefix=
'PUpmx50ns_' 490 chainDict[
'AcquisitionEra'][step]=chainDict[
'CMSSWVersion']
491 chainDict[
'ProcessingString'][step]=processStrPrefix+chainDict[
'nowmTasklist'][-1][
'GlobalTag'].
replace(
'::All',
'').
replace(
'-',
'_')+thisLabel
492 if 'NANOMERGE' in step :
493 chainDict[
'ProcessingString'][step]=processStrPrefix+nanoedmGT.replace(
'::All',
'').
replace(
'-',
'_')+thisLabel
496 chainDict[
'nowmTasklist'][-1][
'AcquisitionEra']=chainDict[
'CMSSWVersion']
497 chainDict[
'nowmTasklist'][-1][
'ProcessingString']=processStrPrefix+chainDict[
'nowmTasklist'][-1][
'GlobalTag'].
replace(
'::All',
'').
replace(
'-',
'_')+thisLabel
498 if 'NANOMERGE' in step :
499 chainDict[
'nowmTasklist'][-1][
'ProcessingString']=processStrPrefix+nanoedmGT.replace(
'::All',
'').
replace(
'-',
'_')+thisLabel
502 chainDict[
'nowmTasklist'][-1][
'Campaign'] = chainDict[
'nowmTasklist'][-1][
'AcquisitionEra']+self.
batchName 505 if (
'DBLMINIAODMCUP15NODQM' in step):
506 chainDict[
'nowmTasklist'][-1][
'ProcessingString']=chainDict[
'nowmTasklist'][-1][
'ProcessingString']+
'_miniAOD' 508 if( chainDict[
'nowmTasklist'][-1][
'Multicore'] ):
515 chainDict[
'nowmTasklist'][-1][
'Memory'] = self.
memoryOffset +
int( chainDict[
'nowmTasklist'][-1][
'Multicore'] -1 ) * self.
memPerCore 519 chainDict[
'RequestString']=
'RV'+chainDict[
'CMSSWVersion']+s[1].
split(
'+')[0]
520 if processStrPrefix
or thisLabel:
521 chainDict[
'RequestString']+=
'_'+processStrPrefix+thisLabel
528 chainDict[
'PrepID'] = chainDict[
'CMSSWVersion']+
'__'+self.
batchTime+
'-'+s[1].
split(
'+')[0]
530 chainDict[
'PrepID'] = chainDict[
'CMSSWVersion']+self.
batchName+
'-'+s[1].
split(
'+')[0]
532 chainDict[
'SubRequestType'] =
"HIRelVal" 539 for i_second
in reversed(
range(len(chainDict[
'nowmTasklist']))):
540 t_second=chainDict[
'nowmTasklist'][i_second]
542 if 'primary' in t_second[
'nowmIO']:
544 primary=t_second[
'nowmIO'][
'primary'][0].
replace(
'file:',
'')
545 for i_input
in reversed(
range(0,i_second)):
546 t_input=chainDict[
'nowmTasklist'][i_input]
547 for (om,o)
in t_input[
'nowmIO'].
items():
551 if (len(t_input[
'TaskName'])>50):
552 if (t_input[
'TaskName'].
find(
'GenSim') != -1):
553 t_input[
'TaskName'] =
'GenSimFull' 554 if (t_input[
'TaskName'].
find(
'Hadronizer') != -1):
555 t_input[
'TaskName'] =
'HadronizerFull' 556 t_second[
'InputTask'] = t_input[
'TaskName']
557 t_second[
'InputFromOutputModule'] = om
559 if t_second[
'TaskName'].startswith(
'HARVEST'):
561 if "_RD" in t_second[
'TaskName']:
562 chainDict[
'DQMHarvestUnit'] =
"multiRun" 563 chainDict[
'DQMConfigCacheID']=t_second[
'ConfigCacheID']
583 chainDict[
'AcquisitionEra'] = chainDict[
'AcquisitionEra'].
values()[0]
584 chainDict[
'ProcessingString'] = chainDict[
'ProcessingString'].
values()[0]
586 chainDict[
'AcquisitionEra'] = chainDict[
'nowmTasklist'][0][
'AcquisitionEra']
587 chainDict[
'ProcessingString'] = chainDict[
'nowmTasklist'][0][
'ProcessingString']
591 chainDict[
'Campaign'] = chainDict[
'AcquisitionEra']+self.
batchName 597 if isinstance(i, int)
and i < len(chainDict[
'nowmTasklist']):
598 chainDict[
'nowmTasklist'][i][
'KeepOutput']=
True 599 for (i,t)
in enumerate(chainDict[
'nowmTasklist']):
600 if t[
'TaskName'].startswith(
'HARVEST'):
604 elif t[
'TaskName']
in self.
keep:
606 if t[
'TaskName'].startswith(
'HYBRIDRepackHI2015VR'):
607 t[
'KeepOutput']=
False 610 chainDict[
'Task%d'%(itask)]=t
617 chainDict[
'TaskChain']=itask
619 chainDict.pop(
'nowmTasklist')
626 labelInCouch=self.
label+
'_'+label
627 cacheName=filePath.split(
'/')[-1]
630 print(
'\tFake upload of',filePath,
'to couch with label',labelInCouch)
634 from modules.wma
import upload_to_couch,DATABASE_NAME
636 print(
'\n\tUnable to find wmcontrol modules. Please include it in your python path\n')
641 print(
"Not re-uploading",filePath,
"to",where,
"for",label)
644 print(
"Loading",filePath,
"to",where,
"for",label)
646 pool = multiprocessing.Pool(1)
647 cacheIds = pool.map( upload_to_couch_oneArg, [(filePath,labelInCouch,self.
user,self.
group,where)] )
648 cacheId = cacheIds[0]
655 if it.startswith(
"Task")
and it!=
'TaskChain':
657 couchID=self.
uploadConf(d[it][
'ConfigCacheID'],
658 str(n)+d[it][
'TaskName'],
661 print(d[it][
'ConfigCacheID'],
" uploaded to couchDB for",
str(n),
"with ID",couchID)
662 d[it][
'ConfigCacheID']=couchID
663 if it ==
'DQMConfigCacheID':
664 couchID=self.
uploadConf(d[
'DQMConfigCacheID'],
668 print(d[
'DQMConfigCacheID'],
"uploaded to couchDB for",
str(n),
"with ID",couchID)
669 d[
'DQMConfigCacheID']=couchID
674 from modules.wma
import makeRequest,approveRequest
675 from wmcontrol
import random_sleep
676 print(
'\n\tFound wmcontrol\n')
678 print(
'\n\tUnable to find wmcontrol modules. Please include it in your python path\n')
686 print(
"Only viewing request",n)
687 print(pprint.pprint(d))
690 print(
"For eyes before submitting",n)
691 print(pprint.pprint(d))
692 print(
"Submitting",n,
"...........")
693 workFlow=makeRequest(self.
wmagent,d,encodeDict=
True)
694 print(
"...........",n,
"submitted")
697 print(
"\n*** WARNING: "+
str(len(self.
longWFName))+
" workflows have too long names for submission (>"+
str(MAXWORKFLOWLENGTH)+
"characters) ***")
def prepare(self, mReader, directories, mode='init')
def performInjectionOptionTest(opt)
def uploadConf(self, filePath, label, where)
the info are not in the task specific dict but in the general dict t_input.update(copy.deepcopy(self.defaultHarvest)) t_input['DQMConfigCacheID']=t_second['ConfigCacheID']
def replace(string, replacements)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
RequiresGPU
Checking and setting up GPU attributes.
numberEventsInLuminosityBlock
def split(sequence, size)
static std::string join(char **cmd)
def __init__(self, opt, mode='init', options='')
def upload_to_couch_oneArg(arguments)