@@ -390,12 +390,26 @@ def createRestDigiTask(name, det='ALLSMALLER'):
390390 # -----------
391391
392392 # TODO: check value for MaxTimeBin; A large value had to be set tmp in order to avoid crashes based on "exceeding timeframe limit"
393- TPCRECOtask1 = createTask (name = 'tpccluster_' + str (tf ), needs = [TPCDigitask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '3' , mem = '16000' )
394- TPCRECOtask1 ['cmd' ] = 'o2-tpc-chunkeddigit-merger --rate 1 --tpc-lanes ' + str (NWORKERS ) + ' --session ' + str (taskcounter )
395- TPCRECOtask1 ['cmd' ] += ' | o2-tpc-reco-workflow ' + getDPL_global_options (bigshm = True , nosmallrate = True ) + ' --input-type digitizer --output-type clusters,send-clusters-per-sector --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads=' + str (NWORKERS )+ '"'
396- workflow ['stages' ].append (TPCRECOtask1 )
397393
398- TPCRECOtask = createTask (name = 'tpcreco_' + str (tf ), needs = [TPCRECOtask1 ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '3' , mem = '16000' )
394+ # We treat TPC clusterization in multiple (sector) steps in order to stay within the memory limit
395+ TPCCLUStask1 = createTask (name = 'tpcclusterpart1_' + str (tf ), needs = [TPCDigitask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '8' , mem = '16000' )
396+ TPCCLUStask1 ['cmd' ] = 'o2-tpc-chunkeddigit-merger --tpc-sectors 0-17 --rate 1 --tpc-lanes ' + str (NWORKERS ) + ' --session ' + str (taskcounter )
397+ TPCCLUStask1 ['cmd' ] += ' | o2-tpc-reco-workflow ' + getDPL_global_options (bigshm = True , nosmallrate = True ) + ' --input-type digitizer --output-type clusters,send-clusters-per-sector --tpc-sectors 0-17 --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads=' + str (NWORKERS )+ '"'
398+ TPCCLUStask1 ['cmd' ] += ' ; mv tpc-native-clusters.root tpc-native-clusters-part1.root'
399+ workflow ['stages' ].append (TPCCLUStask1 )
400+
401+ TPCCLUStask2 = createTask (name = 'tpcclusterpart2_' + str (tf ), needs = [TPCDigitask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '8' , mem = '16000' )
402+ TPCCLUStask2 ['cmd' ] = 'o2-tpc-chunkeddigit-merger --tpc-sectors 18-35 --rate 1 --tpc-lanes ' + str (NWORKERS ) + ' --session ' + str (taskcounter )
403+ TPCCLUStask2 ['cmd' ] += ' | o2-tpc-reco-workflow ' + getDPL_global_options (bigshm = True , nosmallrate = True ) + ' --input-type digitizer --output-type clusters,send-clusters-per-sector --tpc-sectors 18-35 --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads=' + str (NWORKERS )+ '"'
404+ TPCCLUStask2 ['cmd' ] += ' ; mv tpc-native-clusters.root tpc-native-clusters-part2.root'
405+ workflow ['stages' ].append (TPCCLUStask2 )
406+
407+ # additional file merge step (TODO: generalize to arbitrary number of files)
408+ TPCCLUSMERGEtask = createTask (name = 'tpcclustermerge_' + str (tf ), needs = [TPCCLUStask1 ['name' ], TPCCLUStask2 ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '1' )
409+ TPCCLUSMERGEtask ['cmd' ]= 'root -q -b -l "$O2DPG_ROOT/MC/utils/merge_TTrees.C(\\ "tpc-native-clusters-part1.root\\ ", \\ "tpc-native-clusters-part2.root\\ ", \\ "tpcrec\\ ", \\ "tpc-native-clusters.root\\ ")"'
410+ workflow ['stages' ].append (TPCCLUSMERGEtask )
411+
412+ TPCRECOtask = createTask (name = 'tpcreco_' + str (tf ), needs = [TPCCLUSMERGEtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '3' , mem = '16000' )
399413 TPCRECOtask ['cmd' ] = 'o2-tpc-reco-workflow ' + getDPL_global_options (bigshm = True , nosmallrate = True ) + ' --input-type clusters --output-type tracks,send-clusters-per-sector --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads=' + str (NWORKERS )+ '"'
400414 workflow ['stages' ].append (TPCRECOtask )
401415
@@ -421,14 +435,14 @@ def createRestDigiTask(name, det='ALLSMALLER'):
421435 workflow ['stages' ].append (TRDTRACKINGtask )
422436
423437 TOFRECOtask = createTask (name = 'tofmatch_' + str (tf ), needs = [ITSTPCMATCHtask ['name' ], det_to_digitask ["TOF" ]['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ])
424- TOFRECOtask ['cmd' ] = 'o2-tof-reco-workflow ' + getDPL_global_options ()
438+ TOFRECOtask ['cmd' ] = 'o2-tof-reco-workflow ' + getDPL_global_options (nosmallrate = True )
425439 workflow ['stages' ].append (TOFRECOtask )
426440
427441 TOFTPCMATCHERtask = createTask (name = 'toftpcmatch_' + str (tf ), needs = [TOFRECOtask ['name' ], TPCRECOtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ])
428442 TOFTPCMATCHERtask ['cmd' ] = 'o2-tof-matcher-tpc ' + getDPL_global_options ()
429443 workflow ['stages' ].append (TOFTPCMATCHERtask )
430444
431- PVFINDERtask = createTask (name = 'pvfinder_' + str (tf ), needs = [ITSTPCMATCHtask ['name' ], FT0RECOtask ['name' ], TOFTPCMATCHERtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '4 ' )
445+ PVFINDERtask = createTask (name = 'pvfinder_' + str (tf ), needs = [ITSTPCMATCHtask ['name' ], FT0RECOtask ['name' ], TOFTPCMATCHERtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '8' , mem = '4000 ' )
432446 PVFINDERtask ['cmd' ] = 'o2-primary-vertexing-workflow ' + getDPL_global_options (nosmallrate = True )
433447 workflow ['stages' ].append (PVFINDERtask )
434448
@@ -439,7 +453,7 @@ def createRestDigiTask(name, det='ALLSMALLER'):
439453 if usebkgcache :
440454 aodneeds += [ BKG_KINEDOWNLOADER_TASK ['name' ] ]
441455
442- AODtask = createTask (name = 'aod_' + str (tf ), needs = aodneeds , tf = tf , cwd = timeframeworkdir , lab = ["AOD" ], mem = '5000 ' , cpu = '1' )
456+ AODtask = createTask (name = 'aod_' + str (tf ), needs = aodneeds , tf = tf , cwd = timeframeworkdir , lab = ["AOD" ], mem = '4000 ' , cpu = '1' )
443457 AODtask ['cmd' ] = ('' ,'ln -nfs ../bkg_Kine.root . ;' )[doembedding ]
444458 AODtask ['cmd' ] += 'o2-aod-producer-workflow --reco-mctracks-only 1 --aod-writer-keep dangling --aod-writer-resfile \" AO2D\" --aod-writer-resmode UPDATE --aod-timeframe-id ' + str (tf ) + ' ' + getDPL_global_options (bigshm = True )
445459 workflow ['stages' ].append (AODtask )
0 commit comments