Skip to content

Commit 76976c6

Browse files
committed
Update of workflows
* mostly DPL option adjustment: Normaly we want to use --rate 1 in order to avoid CPU spinning source devices, but sometimes this leads to hangs so we only use it when ok * some cleanup * enabling AOD
1 parent e585084 commit 76976c6

File tree

2 files changed

+16
-31
lines changed

2 files changed

+16
-31
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,13 @@ def createTask(name='', needs=[], tf=-1, cwd='./', lab=[], cpu=0, mem=0):
7878
taskcounter = taskcounter + 1
7979
return { 'name': name, 'cmd':'', 'needs': needs, 'resources': { 'cpu': cpu , 'mem': mem }, 'timeframe' : tf, 'labels' : lab, 'cwd' : cwd }
8080

81-
def getDPL_global_options(bigshm=False):
81+
def getDPL_global_options(bigshm=False,nosmallrate=False):
8282
if args.noIPC!=None:
83-
return "-b --run --rate 1 --no-IPC"
83+
return "-b --run --no-IPC " + ('--rate 1','')[nosmallrate]
8484
if bigshm:
85-
return "-b --run --rate 1 --shm-segment-size ${SHMSIZE:-50000000000} --session " + str(taskcounter) + ' --driver-client-backend ws://'
85+
return "-b --run --shm-segment-size ${SHMSIZE:-50000000000} --session " + str(taskcounter) + ' --driver-client-backend ws://' + (' --rate 1','')[nosmallrate]
8686
else:
87-
return "-b --run --rate 1 --session " + str(taskcounter) + ' --driver-client-backend ws://'
88-
87+
return "-b --run --session " + str(taskcounter) + ' --driver-client-backend ws://' + (' --rate 1','')[nosmallrate]
8988

9089
doembedding=True if args.embedding=='True' or args.embedding==True else False
9190

@@ -270,7 +269,7 @@ def createRestDigiTask(name):
270269

271270
# TODO: check value for MaxTimeBin; A large value had to be set tmp in order to avoid crashes bases on "exceeding timeframe limit"
272271
TPCRECOtask=createTask(name='tpcreco_'+str(tf), needs=[TPCDigitask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='3', mem='16000')
273-
TPCRECOtask['cmd'] = 'o2-tpc-reco-workflow ' + getDPL_global_options(bigshm=True) + ' --tpc-digit-reader "--infile tpcdigits.root" --input-type digits --output-type clusters,tracks,send-clusters-per-sector --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads='+str(NWORKERS)+'"'
272+
TPCRECOtask['cmd'] = 'o2-tpc-reco-workflow ' + getDPL_global_options(bigshm=True, nosmallrate=True) + ' --tpc-digit-reader "--infile tpcdigits.root" --input-type digits --output-type clusters,tracks,send-clusters-per-sector --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads='+str(NWORKERS)+'"'
274273
workflow['stages'].append(TPCRECOtask)
275274

276275
ITSRECOtask=createTask(name='itsreco_'+str(tf), needs=[det_to_digitask["ITS"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='1', mem='2000')
@@ -282,7 +281,7 @@ def createRestDigiTask(name):
282281
workflow['stages'].append(FT0RECOtask)
283282

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

288287
# this can be combined with TRD digitization if benefical
@@ -303,24 +302,17 @@ def createRestDigiTask(name):
303302
workflow['stages'].append(TOFTPCMATCHERtask)
304303

305304
PVFINDERtask = createTask(name='pvfinder_'+str(tf), needs=[ITSTPCMATCHtask['name'], FT0RECOtask['name'], TOFTPCMATCHERtask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='4')
306-
PVFINDERtask['cmd'] = 'o2-primary-vertexing-workflow ' + getDPL_global_options()
305+
PVFINDERtask['cmd'] = 'o2-primary-vertexing-workflow ' + getDPL_global_options(nosmallrate=True)
307306
workflow['stages'].append(PVFINDERtask)
308307

309308
# -----------
310309
# produce AOD
311310
# -----------
312311

313-
# enable later. It still has memory access problems
314-
# taskwrapper aod_${tf}.log o2-aod-producer-workflow --aod-writer-keep dangling --aod-writer-resfile "AO2D" --aod-writer-resmode UPDATE --aod-timeframe-id ${tf} $gloOpt
315312
AODtask = createTask(name='aod_'+str(tf), needs=[PVFINDERtask['name'], TOFRECOtask['name'], TRDTRACKINGtask['name']], tf=tf, cwd=timeframeworkdir, lab=["AOD"])
316-
AODtask['cmd'] = ' echo "Would do AOD (enable later)" '
313+
AODtask['cmd'] = 'o2-aod-producer-workflow --aod-writer-keep dangling --aod-writer-resfile \"AO2D\" --aod-writer-resmode UPDATE --aod-timeframe-id ' + str(tf) + ' ' + getDPL_global_options(bigshm=True)
317314
workflow['stages'].append(AODtask)
318315

319-
# cleanup step for this timeframe (we cleanup disc space early so as to make possible checkpoint dumps smaller)
320-
CLEANUPtask = createTask(name='cleanup_'+str(tf), needs=[AODtask['name']], tf=tf, cwd=timeframeworkdir)
321-
CLEANUPtask['cmd'] = ' echo "Doing cleanup" '
322-
workflow['stages'].append(CLEANUPtask)
323-
324316

325317
def trimString(cmd):
326318
return ' '.join(cmd.split())

MC/run/PWGHF/create_embedding_workflow.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ def createTask(name='', needs=[], tf=-1, cwd='./', lab=[], cpu=0, mem=0):
5050
taskcounter = taskcounter + 1
5151
return { 'name': name, 'cmd':'', 'needs': needs, 'resources': { 'cpu': cpu , 'mem': mem }, 'timeframe' : tf, 'labels' : lab, 'cwd' : cwd }
5252

53-
def getDPL_global_options(bigshm=False):
53+
def getDPL_global_options(bigshm=False,nosmallrate=False):
5454
if args.noIPC!=None:
55-
return "-b --run --no-IPC"
55+
return "-b --run --no-IPC " + ('--rate 1','')[nosmallrate]
5656
if bigshm:
57-
return "-b --run --shm-segment-size ${SHMSIZE:-50000000000} --session " + str(taskcounter) + ' --driver-client-backend ws://'
57+
return "-b --run --shm-segment-size ${SHMSIZE:-50000000000} --session " + str(taskcounter) + ' --driver-client-backend ws://' + (' --rate 1','')[nosmallrate]
5858
else:
59-
return "-b --run --session " + str(taskcounter) + ' --driver-client-backend ws://'
59+
return "-b --run --session " + str(taskcounter) + ' --driver-client-backend ws://' + (' --rate 1','')[nosmallrate]
6060

6161
doembedding=True if args.embedding=='True' or args.embedding==True else False
6262

@@ -165,7 +165,7 @@ def createRestDigiTask(name):
165165

166166
# TODO: check value for MaxTimeBin; A large value had to be set tmp in order to avoid crashes bases on "exceeding timeframe limit"
167167
TPCRECOtask=createTask(name='tpcreco_'+str(tf), needs=[TPCDigitask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='3', mem='16000')
168-
TPCRECOtask['cmd'] = 'o2-tpc-reco-workflow ' + getDPL_global_options(bigshm=True) + ' --tpc-digit-reader "--infile tpcdigits.root" --input-type digits --output-type clusters,tracks,send-clusters-per-sector --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads='+str(NWORKERS)+'"'
168+
TPCRECOtask['cmd'] = 'o2-tpc-reco-workflow ' + getDPL_global_options(bigshm=True, nosmallrate=True) + ' --tpc-digit-reader "--infile tpcdigits.root" --input-type digits --output-type clusters,tracks,send-clusters-per-sector --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads='+str(NWORKERS)+'"'
169169
workflow['stages'].append(TPCRECOtask)
170170

171171
ITSRECOtask=createTask(name='itsreco_'+str(tf), needs=[det_to_digitask["ITS"]['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='1', mem='2000')
@@ -177,7 +177,7 @@ def createRestDigiTask(name):
177177
workflow['stages'].append(FT0RECOtask)
178178

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

183183
# this can be combined with TRD digitization if benefical
@@ -198,24 +198,17 @@ def createRestDigiTask(name):
198198
workflow['stages'].append(TOFTPCMATCHERtask)
199199

200200
PVFINDERtask = createTask(name='pvfinder_'+str(tf), needs=[ITSTPCMATCHtask['name'], FT0RECOtask['name'], TOFTPCMATCHERtask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='4')
201-
PVFINDERtask['cmd'] = 'o2-primary-vertexing-workflow ' + getDPL_global_options()
201+
PVFINDERtask['cmd'] = 'o2-primary-vertexing-workflow ' + getDPL_global_options(nosmallrate=True)
202202
workflow['stages'].append(PVFINDERtask)
203203

204204
# -----------
205205
# produce AOD
206206
# -----------
207207

208-
# enable later. It still has memory access problems
209-
# taskwrapper aod_${tf}.log o2-aod-producer-workflow --aod-writer-keep dangling --aod-writer-resfile "AO2D" --aod-writer-resmode UPDATE --aod-timeframe-id ${tf} $gloOpt
210208
AODtask = createTask(name='aod_'+str(tf), needs=[PVFINDERtask['name'], TOFRECOtask['name'], TRDTRACKINGtask['name']], tf=tf, cwd=timeframeworkdir, lab=["AOD"])
211-
AODtask['cmd'] = 'o2-aod-producer-workflow --aod-writer-keep dangling --aod-writer-resfile \"AO2D\" --aod-writer-resmode UPDATE --aod-timeframe-id ' + str(tf) + ' ' + getDPL_global_options() # echo "Would do AOD (enable later)" '
209+
AODtask['cmd'] = 'o2-aod-producer-workflow --aod-writer-keep dangling --aod-writer-resfile \"AO2D\" --aod-writer-resmode UPDATE --aod-timeframe-id ' + str(tf) + ' ' + getDPL_global_options(bigshm=True)
212210
workflow['stages'].append(AODtask)
213211

214-
# cleanup step for this timeframe (we cleanup disc space early so as to make possible checkpoint dumps smaller)
215-
CLEANUPtask = createTask(name='cleanup_'+str(tf), needs=[AODtask['name']], tf=tf, cwd=timeframeworkdir)
216-
CLEANUPtask['cmd'] = ' echo "Doing cleanup" '
217-
workflow['stages'].append(CLEANUPtask)
218-
219212

220213
def trimString(cmd):
221214
return ' '.join(cmd.split())

0 commit comments

Comments
 (0)