From e11bc1f09462553526f085cf892f18f0e34e95f5 Mon Sep 17 00:00:00 2001 From: Sandro Wenzel Date: Fri, 4 Jun 2021 09:12:44 +0200 Subject: [PATCH] adjusting few resource fields --- MC/bin/o2dpg_sim_workflow.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/MC/bin/o2dpg_sim_workflow.py b/MC/bin/o2dpg_sim_workflow.py index 2817caa82..7522ea8e3 100755 --- a/MC/bin/o2dpg_sim_workflow.py +++ b/MC/bin/o2dpg_sim_workflow.py @@ -94,7 +94,7 @@ workflow['stages'] = [] taskcounter=0 -def createTask(name='', needs=[], tf=-1, cwd='./', lab=[], cpu=0, mem=0): +def createTask(name='', needs=[], tf=-1, cwd='./', lab=[], cpu=1, mem=500): global taskcounter taskcounter = taskcounter + 1 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): signalneeds = signalneeds + [ BKGtask['name'] ] else: signalneeds = signalneeds + [ BKG_HEADER_task['name'] ] - SGNtask=createTask(name='sgnsim_'+str(tf), needs=signalneeds, tf=tf, cwd='tf'+str(tf), lab=["GEANT"], cpu='5.') + SGNtask=createTask(name='sgnsim_'+str(tf), needs=signalneeds, tf=tf, cwd='tf'+str(tf), lab=["GEANT"], cpu='5.', mem='2000') SGNtask['cmd']='o2-sim -e ' + str(SIMENGINE) + ' ' + str(MODULES) + ' -n ' + str(NSIGEVENTS) + ' -j ' \ + str(NWORKERS) + ' -g ' + str(GENERATOR) + ' ' + str(TRIGGER)+ ' ' + str(CONFKEY) \ + ' ' + str(INIFILE) + ' -o ' + signalprefix + ' ' + embeddinto @@ -315,7 +315,7 @@ def getDPL_global_options(bigshm=False,nosmallrate=False): # We need to be careful here and distinguish between embedding and non-embedding cases # (otherwise it can confuse itstpcmatching, see O2-2026). This is because only one of the GRPs is updated during digitization. if doembedding: - LinkGRPFileTask=createTask(name='linkGRP_'+str(tf), needs=[BKG_HEADER_task['name'] if usebkgcache else BKGtask['name'] ], tf=tf, cwd=timeframeworkdir) + LinkGRPFileTask=createTask(name='linkGRP_'+str(tf), needs=[BKG_HEADER_task['name'] if usebkgcache else BKGtask['name'] ], tf=tf, cwd=timeframeworkdir, cpu='0',mem='0') LinkGRPFileTask['cmd']=''' ln -nsf ../bkg_grp.root o2sim_grp.root; ln -nsf ../bkg_geometry.root o2sim_geometry.root; @@ -323,7 +323,7 @@ def getDPL_global_options(bigshm=False,nosmallrate=False): ln -nsf ../bkg_grp.root bkg_grp.root ''' else: - LinkGRPFileTask=createTask(name='linkGRP_'+str(tf), needs=[SGNtask['name']], tf=tf, cwd=timeframeworkdir) + LinkGRPFileTask=createTask(name='linkGRP_'+str(tf), needs=[SGNtask['name']], tf=tf, cwd=timeframeworkdir, cpu='0', mem='0') LinkGRPFileTask['cmd']='ln -nsf ' + signalprefix + '_grp.root o2sim_grp.root ; ln -nsf ' + signalprefix + '_geometry.root o2sim_geometry.root' workflow['stages'].append(LinkGRPFileTask) @@ -421,7 +421,7 @@ def createRestDigiTask(name, det='ALLSMALLER'): taskname = 'tpcclusterpart' + str(s) + '_' + str(tf) tpcclustertasks.append(taskname) tpcclussect = createTask(name=taskname, needs=[TPCDigitask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='1', mem='2000') - tpcclussect['cmd'] = 'o2-tpc-chunkeddigit-merger --tpc-sectors ' + str(s) + ' --rate 1000 --tpc-lanes 8 ' + tpcclussect['cmd'] = 'o2-tpc-chunkeddigit-merger --tpc-sectors ' + str(s) + ' --rate 1000 --tpc-lanes ' + str(NWORKERS) 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"' workflow['stages'].append(tpcclussect) @@ -437,7 +437,7 @@ def createRestDigiTask(name, det='ALLSMALLER'): ITSRECOtask['cmd'] = 'o2-its-reco-workflow --trackerCA --tracking-mode async ' + getDPL_global_options() workflow['stages'].append(ITSRECOtask) - FT0RECOtask=createTask(name='ft0reco_'+str(tf), needs=[det_to_digitask["FT0"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"]) + FT0RECOtask=createTask(name='ft0reco_'+str(tf), needs=[det_to_digitask["FT0"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], mem='1000') FT0RECOtask['cmd'] = 'o2-ft0-reco-workflow ' + getDPL_global_options() workflow['stages'].append(FT0RECOtask) @@ -445,19 +445,19 @@ def createRestDigiTask(name, det='ALLSMALLER'): 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\"' workflow['stages'].append(ITSTPCMATCHtask) - TRDTRACKINGtask = createTask(name='trdreco_'+str(tf), needs=[TRDDigitask['name'], ITSTPCMATCHtask['name'], TPCRECOtask['name'], ITSRECOtask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"]) - TRDTRACKINGtask['cmd'] = 'o2-trd-global-tracking ' + getDPL_global_options(bigshm=True, nosmallrate=False) + ' --disable-mc' # TRD tracker cannot handle MC labels yet + 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') + TRDTRACKINGtask['cmd'] = 'o2-trd-global-tracking ' + getDPL_global_options() + ' --disable-mc' # TRD tracker cannot handle MC labels yet workflow['stages'].append(TRDTRACKINGtask) - TOFRECOtask = createTask(name='tofmatch_'+str(tf), needs=[ITSTPCMATCHtask['name'], det_to_digitask["TOF"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"]) + TOFRECOtask = createTask(name='tofmatch_'+str(tf), needs=[ITSTPCMATCHtask['name'], det_to_digitask["TOF"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], mem='1500') TOFRECOtask['cmd'] = 'o2-tof-reco-workflow ' + getDPL_global_options(nosmallrate=False) workflow['stages'].append(TOFRECOtask) - TOFTPCMATCHERtask = createTask(name='toftpcmatch_'+str(tf), needs=[TOFRECOtask['name'], TPCRECOtask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"]) + TOFTPCMATCHERtask = createTask(name='toftpcmatch_'+str(tf), needs=[TOFRECOtask['name'], TPCRECOtask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], mem='1000') TOFTPCMATCHERtask['cmd'] = 'o2-tof-matcher-tpc ' + getDPL_global_options() workflow['stages'].append(TOFTPCMATCHERtask) - MFTRECOtask = createTask(name='mftreco_'+str(tf), needs=[det_to_digitask["MFT"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"]) + MFTRECOtask = createTask(name='mftreco_'+str(tf), needs=[det_to_digitask["MFT"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], mem='1500') MFTRECOtask['cmd'] = 'o2-mft-reco-workflow ' + getDPL_global_options(nosmallrate=False) workflow['stages'].append(MFTRECOtask)