110110workflow ['stages' ] = []
111111
112112
113- def getDPL_global_options (bigshm = False , nosmallrate = False ):
114- common = "-b --run --fairmq-ipc-prefix ${FAIRMQ_IPC_PREFIX:-./} --driver-client-backend ws:// " + ( '--rate 1000' , '' )[ nosmallrate ]
113+ def getDPL_global_options (bigshm = False ):
114+ common = "-b --run --fairmq-ipc-prefix ${FAIRMQ_IPC_PREFIX:-./} --driver-client-backend ws:// "
115115 if args .noIPC != None :
116116 return common + " --no-IPC "
117117 if bigshm :
@@ -487,7 +487,7 @@ def createRestDigiTask(name, det='ALLSMALLER'):
487487 t = createTask (name = name , needs = tneeds ,
488488 tf = tf , cwd = timeframeworkdir , lab = ["DIGI" ,"SMALLDIGI" ], cpu = NWORKERS )
489489 t ['cmd' ] = ('' ,'ln -nfs ../bkg_Hits*.root . ;' )[doembedding ]
490- t ['cmd' ] += 'o2-sim-digitizer-workflow ' + getDPL_global_options (nosmallrate = True ) + ' -n ' + str (args .ns ) + simsoption + ' --skipDet TPC,TRD --interactionRate ' + str (INTRATE ) + ' --incontext ' + str (CONTEXTFILE ) + ' --disable-write-ini'
490+ t ['cmd' ] += 'o2-sim-digitizer-workflow ' + getDPL_global_options () + ' -n ' + str (args .ns ) + simsoption + ' --skipDet TPC,TRD --interactionRate ' + str (INTRATE ) + ' --incontext ' + str (CONTEXTFILE ) + ' --disable-write-ini'
491491 workflow ['stages' ].append (t )
492492 return t
493493
@@ -520,16 +520,17 @@ def createRestDigiTask(name, det='ALLSMALLER'):
520520 # We treat TPC clusterization in multiple (sector) steps in order to stay within the memory limit
521521 # We seem to be needing to ask for 2 sectors at least, otherwise there is a problem with the branch naming.
522522 tpcclustertasks = []
523- for s in range (0 ,35 ,2 ):
524- taskname = 'tpcclusterpart' + str ((int )(s / 2 )) + '_' + str (tf )
523+ sectorpertask = 6
524+ for s in range (0 ,35 ,sectorpertask ):
525+ taskname = 'tpcclusterpart' + str ((int )(s / sectorpertask )) + '_' + str (tf )
525526 tpcclustertasks .append (taskname )
526- tpcclussect = createTask (name = taskname , needs = [TPCDigitask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '1 ' , mem = '2000 ' )
527- tpcclussect ['cmd' ] = 'o2-tpc-chunkeddigit-merger --tpc-sectors ' + str (s )+ ', ' + str (s + 1 ) + ' --rate 1000 --tpc-lanes ' + str (NWORKERS )
528- 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 ((int )(s / 2 )) + '.root --tpc-sectors ' + str (s )+ ', ' + str (s + 1 ) + ' --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads=1 "'
529- tpcclussect ['env' ] = { "OMP_NUM_THREADS" : "1" } # we disable OpenMP since running in scalar mode anyway
527+ tpcclussect = createTask (name = taskname , needs = [TPCDigitask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '2 ' , mem = '8000 ' )
528+ tpcclussect ['cmd' ] = 'o2-tpc-chunkeddigit-merger --tpc-sectors ' + str (s )+ '- ' + str (s + sectorpertask - 1 ) + ' --tpc-lanes ' + str (NWORKERS )
529+ tpcclussect ['cmd' ] += ' | o2-tpc-reco-workflow ' + getDPL_global_options (bigshm = True ) + ' --input-type digitizer --output-type clusters,send-clusters-per-sector --outfile tpc-native-clusters-part' + str ((int )(s / sectorpertask )) + '.root --tpc-sectors ' + str (s )+ '- ' + str (s + sectorpertask - 1 ) + ' --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads=4 "'
530+ tpcclussect ['env' ] = { "OMP_NUM_THREADS" : "4" , "SHMSIZE" : "5000000000" }
530531 workflow ['stages' ].append (tpcclussect )
531532
532- TPCCLUSMERGEtask = createTask (name = 'tpcclustermerge_' + str (tf ), needs = tpcclustertasks , tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '1' )
533+ TPCCLUSMERGEtask = createTask (name = 'tpcclustermerge_' + str (tf ), needs = tpcclustertasks , tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '1' , mem = '10000' )
533534 TPCCLUSMERGEtask ['cmd' ]= 'o2-commonutils-treemergertool -i tpc-native-clusters-part*.root -o tpc-native-clusters.root -t tpcrec' #--asfriend preferable but does not work
534535 workflow ['stages' ].append (TPCCLUSMERGEtask )
535536 tpcreconeeds .append (TPCCLUSMERGEtask ['name' ])
@@ -541,7 +542,7 @@ def createRestDigiTask(name, det='ALLSMALLER'):
541542 tpcreconeeds .append (tpcclus ['name' ])
542543
543544 TPCRECOtask = createTask (name = 'tpcreco_' + str (tf ), needs = tpcreconeeds , tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], relative_cpu = 3 / 8 , mem = '16000' )
544- TPCRECOtask ['cmd' ] = 'o2-tpc-reco-workflow ' + getDPL_global_options (bigshm = True , nosmallrate = False ) + ' --input-type clusters --output-type tracks,send-clusters-per-sector --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads=' + str (NWORKERS )+ '"'
545+ TPCRECOtask ['cmd' ] = 'o2-tpc-reco-workflow ' + getDPL_global_options (bigshm = True ) + ' --input-type clusters --output-type tracks,send-clusters-per-sector --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads=' + str (NWORKERS )+ '"'
545546 workflow ['stages' ].append (TPCRECOtask )
546547
547548 ITSRECOtask = createTask (name = 'itsreco_' + str (tf ), needs = [det_to_digitask ["ITS" ]['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '1' , mem = '2000' )
@@ -553,7 +554,7 @@ def createRestDigiTask(name, det='ALLSMALLER'):
553554 workflow ['stages' ].append (FT0RECOtask )
554555
555556 ITSTPCMATCHtask = createTask (name = 'itstpcMatch_' + str (tf ), needs = [TPCRECOtask ['name' ], ITSRECOtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '8000' , relative_cpu = 3 / 8 )
556- 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\" '
557+ 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\" '
557558 workflow ['stages' ].append (ITSTPCMATCHtask )
558559
559560 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' )
@@ -562,20 +563,20 @@ def createRestDigiTask(name, det='ALLSMALLER'):
562563 workflow ['stages' ].append (TRDTRACKINGtask )
563564
564565 TOFRECOtask = createTask (name = 'tofmatch_' + str (tf ), needs = [ITSTPCMATCHtask ['name' ], det_to_digitask ["TOF" ]['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '1500' )
565- TOFRECOtask ['cmd' ] = 'o2-tof-reco-workflow ' + getDPL_global_options (nosmallrate = False )
566+ TOFRECOtask ['cmd' ] = 'o2-tof-reco-workflow ' + getDPL_global_options ()
566567 workflow ['stages' ].append (TOFRECOtask )
567568
568569 TOFTPCMATCHERtask = createTask (name = 'toftpcmatch_' + str (tf ), needs = [TOFRECOtask ['name' ], TPCRECOtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '1000' )
569570 TOFTPCMATCHERtask ['cmd' ] = 'o2-tof-matcher-workflow ' + getDPL_global_options ()
570571 workflow ['stages' ].append (TOFTPCMATCHERtask )
571572
572573 MFTRECOtask = createTask (name = 'mftreco_' + str (tf ), needs = [det_to_digitask ["MFT" ]['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '1500' )
573- MFTRECOtask ['cmd' ] = 'o2-mft-reco-workflow ' + getDPL_global_options (nosmallrate = False )
574+ MFTRECOtask ['cmd' ] = 'o2-mft-reco-workflow ' + getDPL_global_options ()
574575 workflow ['stages' ].append (MFTRECOtask )
575576
576577 pvfinderneeds = [ITSTPCMATCHtask ['name' ], FT0RECOtask ['name' ], TOFTPCMATCHERtask ['name' ], MFTRECOtask ['name' ], TRDTRACKINGtask ['name' ]]
577578 PVFINDERtask = createTask (name = 'pvfinder_' + str (tf ), needs = pvfinderneeds , tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = NWORKERS , mem = '4000' )
578- PVFINDERtask ['cmd' ] = 'o2-primary-vertexing-workflow ' + getDPL_global_options (nosmallrate = False )
579+ PVFINDERtask ['cmd' ] = 'o2-primary-vertexing-workflow ' + getDPL_global_options ()
579580 # PVFINDERtask['cmd'] += ' --vertexing-sources "ITS,ITS-TPC,ITS-TPC-TOF" --vetex-track-matching-sources "ITS,ITS-TPC,ITS-TPC-TOF"'
580581 workflow ['stages' ].append (PVFINDERtask )
581582
@@ -585,49 +586,49 @@ def createRestDigiTask(name, det='ALLSMALLER'):
585586 # fixme: not working yet, ITS will prepare a way to read clusters and tracks. Also ITSDictionary will be needed.
586587 # ITSClustersTracksQCneeds = [ITSRECOtask['name']]
587588 # ITSClustersTracksQCtask = createTask(name='itsClustersTracksQC_'+str(tf), needs=ITSClustersTracksQCneeds, tf=tf, cwd=timeframeworkdir, lab=["QC"], cpu=1, mem='2000')
588- # ITSClustersTracksQCtask['cmd'] = 'o2-missing-reader | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/its-clusters-tracks-qc.json ' + getDPL_global_options(nosmallrate=False )
589+ # ITSClustersTracksQCtask['cmd'] = 'o2-missing-reader | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/its-clusters-tracks-qc.json ' + getDPL_global_options()
589590 # workflow['stages'].append(ITSClustersTracksQCtask)
590591
591592 ### MFT
592593 # fixme: there is a bug in Check which causes a segfault, uncomment when the fix is merged
593594 # MFTDigitsQCneeds = [det_to_digitask["MFT"]['name']]
594595 # MFTDigitsQCtask = createTask(name='mftDigitsQC_'+str(tf), needs=MFTDigitsQCneeds, tf=tf, cwd=timeframeworkdir, lab=["QC"], cpu=1, mem='2000')
595- # MFTDigitsQCtask['cmd'] = 'o2-qc-mft-digits-root-file-reader --mft-digit-infile=mftdigits.root | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/qc-mft-digit.json ' + getDPL_global_options(nosmallrate=False )
596+ # MFTDigitsQCtask['cmd'] = 'o2-qc-mft-digits-root-file-reader --mft-digit-infile=mftdigits.root | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/qc-mft-digit.json ' + getDPL_global_options()
596597 # workflow['stages'].append(MFTDigitsQCtask)
597598
598599 MFTClustersQCneeds = [MFTRECOtask ['name' ]]
599600 MFTClustersQCtask = createTask (name = 'mftClustersQC_' + str (tf ), needs = MFTClustersQCneeds , tf = tf , cwd = timeframeworkdir , lab = ["QC" ], cpu = 1 , mem = '2000' )
600- MFTClustersQCtask ['cmd' ] = 'o2-qc-mft-clusters-root-file-reader --mft-cluster-infile=mftclusters.root | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/qc-mft-cluster.json ' + getDPL_global_options (nosmallrate = False )
601+ MFTClustersQCtask ['cmd' ] = 'o2-qc-mft-clusters-root-file-reader --mft-cluster-infile=mftclusters.root | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/qc-mft-cluster.json ' + getDPL_global_options ()
601602 workflow ['stages' ].append (MFTClustersQCtask )
602603
603604 MFTTracksQCneeds = [MFTRECOtask ['name' ]]
604605 MFTTracksQCtask = createTask (name = 'mftTracksQC_' + str (tf ), needs = MFTTracksQCneeds , tf = tf , cwd = timeframeworkdir , lab = ["QC" ], cpu = 1 , mem = '2000' )
605- MFTTracksQCtask ['cmd' ] = 'o2-qc-mft-tracks-root-file-reader --mft-track-infile=mfttracks.root | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/qc-mft-track.json ' + getDPL_global_options (nosmallrate = False )
606+ MFTTracksQCtask ['cmd' ] = 'o2-qc-mft-tracks-root-file-reader --mft-track-infile=mfttracks.root | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/qc-mft-track.json ' + getDPL_global_options ()
606607 workflow ['stages' ].append (MFTTracksQCtask )
607608
608609 ### TPC
609610 TPCTrackingQCneeds = [TPCRECOtask ['name' ]]
610611 TPCTrackingQCtask = createTask (name = 'tpcTrackingQC_' + str (tf ), needs = TPCTrackingQCneeds , tf = tf , cwd = timeframeworkdir , lab = ["QC" ], cpu = 2 , mem = '2000' )
611- TPCTrackingQCtask ['cmd' ] = 'o2-tpc-track-reader | o2-tpc-reco-workflow --input-type clusters --infile tpc-native-clusters.root --output-type disable-writer | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/tpc-qc-tracking-direct.json ' + getDPL_global_options (nosmallrate = False )
612+ TPCTrackingQCtask ['cmd' ] = 'o2-tpc-track-reader | o2-tpc-reco-workflow --input-type clusters --infile tpc-native-clusters.root --output-type disable-writer | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/tpc-qc-tracking-direct.json ' + getDPL_global_options ()
612613 workflow ['stages' ].append (TPCTrackingQCtask )
613614
614615 ### TRD
615616 TRDDigitsQCneeds = [TRDDigitask ['name' ]]
616617 TRDDigitsQCtask = createTask (name = 'trdDigitsQC_' + str (tf ), needs = TRDDigitsQCneeds , tf = tf , cwd = timeframeworkdir , lab = ["QC" ], cpu = 1 , mem = '2000' )
617- TRDDigitsQCtask ['cmd' ] = 'o2-trd-trap-sim | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/trd-digits-task.json ' + getDPL_global_options (nosmallrate = False )
618+ TRDDigitsQCtask ['cmd' ] = 'o2-trd-trap-sim | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/trd-digits-task.json ' + getDPL_global_options ()
618619 workflow ['stages' ].append (TRDDigitsQCtask )
619620
620621 ### RECO
621622 vertexQCneeds = [PVFINDERtask ['name' ]]
622623 vertexQCtask = createTask (name = 'vertexQC_' + str (tf ), needs = vertexQCneeds , tf = tf , cwd = timeframeworkdir , lab = ["QC" ], cpu = 1 , mem = '2000' )
623- vertexQCtask ['cmd' ] = 'o2-primary-vertex-reader-workflow | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/vertexing-qc-direct-mc.json ' + getDPL_global_options (nosmallrate = False )
624+ vertexQCtask ['cmd' ] = 'o2-primary-vertex-reader-workflow | o2-qc --config json://${O2DPG_ROOT}/MC/config/QC/json/vertexing-qc-direct-mc.json ' + getDPL_global_options ()
624625 workflow ['stages' ].append (vertexQCtask )
625626
626627
627628
628629 #secondary vertexer
629630 SVFINDERtask = createTask (name = 'svfinder_' + str (tf ), needs = [PVFINDERtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = 1 , mem = '2000' )
630- SVFINDERtask ['cmd' ] = 'o2-secondary-vertexing-workflow ' + getDPL_global_options (nosmallrate = False )
631+ SVFINDERtask ['cmd' ] = 'o2-secondary-vertexing-workflow ' + getDPL_global_options ()
631632 workflow ['stages' ].append (SVFINDERtask )
632633
633634 # -----------
0 commit comments