Skip to content

Commit e11bc1f

Browse files
committed
adjusting few resource fields
1 parent 6ec05c6 commit e11bc1f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
workflow['stages'] = []
9595

9696
taskcounter=0
97-
def createTask(name='', needs=[], tf=-1, cwd='./', lab=[], cpu=0, mem=0):
97+
def createTask(name='', needs=[], tf=-1, cwd='./', lab=[], cpu=1, mem=500):
9898
global taskcounter
9999
taskcounter = taskcounter + 1
100100
return { 'name': name, 'cmd':'', 'needs': needs, 'resources': { 'cpu': cpu , 'mem': mem }, 'timeframe' : tf, 'labels' : lab, 'cwd' : cwd }
@@ -304,7 +304,7 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
304304
signalneeds = signalneeds + [ BKGtask['name'] ]
305305
else:
306306
signalneeds = signalneeds + [ BKG_HEADER_task['name'] ]
307-
SGNtask=createTask(name='sgnsim_'+str(tf), needs=signalneeds, tf=tf, cwd='tf'+str(tf), lab=["GEANT"], cpu='5.')
307+
SGNtask=createTask(name='sgnsim_'+str(tf), needs=signalneeds, tf=tf, cwd='tf'+str(tf), lab=["GEANT"], cpu='5.', mem='2000')
308308
SGNtask['cmd']='o2-sim -e ' + str(SIMENGINE) + ' ' + str(MODULES) + ' -n ' + str(NSIGEVENTS) + ' -j ' \
309309
+ str(NWORKERS) + ' -g ' + str(GENERATOR) + ' ' + str(TRIGGER)+ ' ' + str(CONFKEY) \
310310
+ ' ' + str(INIFILE) + ' -o ' + signalprefix + ' ' + embeddinto
@@ -315,15 +315,15 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
315315
# We need to be careful here and distinguish between embedding and non-embedding cases
316316
# (otherwise it can confuse itstpcmatching, see O2-2026). This is because only one of the GRPs is updated during digitization.
317317
if doembedding:
318-
LinkGRPFileTask=createTask(name='linkGRP_'+str(tf), needs=[BKG_HEADER_task['name'] if usebkgcache else BKGtask['name'] ], tf=tf, cwd=timeframeworkdir)
318+
LinkGRPFileTask=createTask(name='linkGRP_'+str(tf), needs=[BKG_HEADER_task['name'] if usebkgcache else BKGtask['name'] ], tf=tf, cwd=timeframeworkdir, cpu='0',mem='0')
319319
LinkGRPFileTask['cmd']='''
320320
ln -nsf ../bkg_grp.root o2sim_grp.root;
321321
ln -nsf ../bkg_geometry.root o2sim_geometry.root;
322322
ln -nsf ../bkg_geometry.root bkg_geometry.root;
323323
ln -nsf ../bkg_grp.root bkg_grp.root
324324
'''
325325
else:
326-
LinkGRPFileTask=createTask(name='linkGRP_'+str(tf), needs=[SGNtask['name']], tf=tf, cwd=timeframeworkdir)
326+
LinkGRPFileTask=createTask(name='linkGRP_'+str(tf), needs=[SGNtask['name']], tf=tf, cwd=timeframeworkdir, cpu='0', mem='0')
327327
LinkGRPFileTask['cmd']='ln -nsf ' + signalprefix + '_grp.root o2sim_grp.root ; ln -nsf ' + signalprefix + '_geometry.root o2sim_geometry.root'
328328
workflow['stages'].append(LinkGRPFileTask)
329329

@@ -421,7 +421,7 @@ def createRestDigiTask(name, det='ALLSMALLER'):
421421
taskname = 'tpcclusterpart' + str(s) + '_' + str(tf)
422422
tpcclustertasks.append(taskname)
423423
tpcclussect = createTask(name=taskname, needs=[TPCDigitask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='1', mem='2000')
424-
tpcclussect['cmd'] = 'o2-tpc-chunkeddigit-merger --tpc-sectors ' + str(s) + ' --rate 1000 --tpc-lanes 8 '
424+
tpcclussect['cmd'] = 'o2-tpc-chunkeddigit-merger --tpc-sectors ' + str(s) + ' --rate 1000 --tpc-lanes ' + str(NWORKERS)
425425
tpcclussect['cmd'] += ' | o2-tpc-reco-workflow ' + getDPL_global_options() + ' --input-type digitizer --output-type clusters,send-clusters-per-sector --outfile tpc-native-clusters-part' + str(s) + '.root --tpc-sectors ' + str(s) + ' --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads=1"'
426426
workflow['stages'].append(tpcclussect)
427427

@@ -437,27 +437,27 @@ def createRestDigiTask(name, det='ALLSMALLER'):
437437
ITSRECOtask['cmd'] = 'o2-its-reco-workflow --trackerCA --tracking-mode async ' + getDPL_global_options()
438438
workflow['stages'].append(ITSRECOtask)
439439

440-
FT0RECOtask=createTask(name='ft0reco_'+str(tf), needs=[det_to_digitask["FT0"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"])
440+
FT0RECOtask=createTask(name='ft0reco_'+str(tf), needs=[det_to_digitask["FT0"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], mem='1000')
441441
FT0RECOtask['cmd'] = 'o2-ft0-reco-workflow ' + getDPL_global_options()
442442
workflow['stages'].append(FT0RECOtask)
443443

444444
ITSTPCMATCHtask=createTask(name='itstpcMatch_'+str(tf), needs=[TPCRECOtask['name'], ITSRECOtask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], mem='8000', cpu='3')
445445
ITSTPCMATCHtask['cmd']= 'o2-tpcits-match-workflow ' + getDPL_global_options(bigshm=True, nosmallrate=False) + ' --tpc-track-reader \"tpctracks.root\" --tpc-native-cluster-reader \"--infile tpc-native-clusters.root\"'
446446
workflow['stages'].append(ITSTPCMATCHtask)
447447

448-
TRDTRACKINGtask = createTask(name='trdreco_'+str(tf), needs=[TRDDigitask['name'], ITSTPCMATCHtask['name'], TPCRECOtask['name'], ITSRECOtask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"])
449-
TRDTRACKINGtask['cmd'] = 'o2-trd-global-tracking ' + getDPL_global_options(bigshm=True, nosmallrate=False) + ' --disable-mc' # TRD tracker cannot handle MC labels yet
448+
TRDTRACKINGtask = createTask(name='trdreco_'+str(tf), needs=[TRDDigitask['name'], ITSTPCMATCHtask['name'], TPCRECOtask['name'], ITSRECOtask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='1', mem='2000')
449+
TRDTRACKINGtask['cmd'] = 'o2-trd-global-tracking ' + getDPL_global_options() + ' --disable-mc' # TRD tracker cannot handle MC labels yet
450450
workflow['stages'].append(TRDTRACKINGtask)
451451

452-
TOFRECOtask = createTask(name='tofmatch_'+str(tf), needs=[ITSTPCMATCHtask['name'], det_to_digitask["TOF"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"])
452+
TOFRECOtask = createTask(name='tofmatch_'+str(tf), needs=[ITSTPCMATCHtask['name'], det_to_digitask["TOF"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], mem='1500')
453453
TOFRECOtask['cmd'] = 'o2-tof-reco-workflow ' + getDPL_global_options(nosmallrate=False)
454454
workflow['stages'].append(TOFRECOtask)
455455

456-
TOFTPCMATCHERtask = createTask(name='toftpcmatch_'+str(tf), needs=[TOFRECOtask['name'], TPCRECOtask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"])
456+
TOFTPCMATCHERtask = createTask(name='toftpcmatch_'+str(tf), needs=[TOFRECOtask['name'], TPCRECOtask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], mem='1000')
457457
TOFTPCMATCHERtask['cmd'] = 'o2-tof-matcher-tpc ' + getDPL_global_options()
458458
workflow['stages'].append(TOFTPCMATCHERtask)
459459

460-
MFTRECOtask = createTask(name='mftreco_'+str(tf), needs=[det_to_digitask["MFT"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"])
460+
MFTRECOtask = createTask(name='mftreco_'+str(tf), needs=[det_to_digitask["MFT"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], mem='1500')
461461
MFTRECOtask['cmd'] = 'o2-mft-reco-workflow ' + getDPL_global_options(nosmallrate=False)
462462
workflow['stages'].append(MFTRECOtask)
463463

0 commit comments

Comments
 (0)