Skip to content

Commit e06a938

Browse files
committed
power feature to disable TPC digit chunking
1 parent a68d151 commit e06a938

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

MC/bin/o2dpg_sim_workflow.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,11 @@
9292
# argument for early cleanup
9393
parser.add_argument('--early-tf-cleanup',action='store_true', help='whether to cleanup intermediate artefacts after each timeframe is done')
9494

95-
# power feature (for playing) --> does not appear in help message
95+
# power features (for playing) --> does not appear in help message
9696
# help='Treat smaller sensors in a single digitization')
9797
parser.add_argument('--no-combine-smaller-digi', action='store_true', help=argparse.SUPPRESS)
9898
parser.add_argument('--no-combine-dpl-devices', action='store_true', help=argparse.SUPPRESS)
99+
parser.add_argument('--no-tpc-digitchunking', action='store_true', help=argparse.SUPPRESS)
99100
parser.add_argument('--combine-tpc-clusterization', action='store_true', help=argparse.SUPPRESS) #<--- useful for small productions (pp, low interaction rate, small number of events)
100101
parser.add_argument('--first-orbit', default=0, type=int, help=argparse.SUPPRESS) # to set the first orbit number of the run for HBFUtils (only used when anchoring)
101102
# (consider doing this rather in O2 digitization code directly)
@@ -667,7 +668,8 @@ def putConfigValuesNew(listOfMainKeys=[], localCF = {}):
667668
TPCDigitask=createTask(name='tpcdigi_'+str(tf), needs=tpcdigineeds,
668669
tf=tf, cwd=timeframeworkdir, lab=["DIGI"], cpu=NWORKERS, mem='9000')
669670
TPCDigitask['cmd'] = ('','ln -nfs ../bkg_HitsTPC.root . ;')[doembedding]
670-
TPCDigitask['cmd'] += '${O2_ROOT}/bin/o2-sim-digitizer-workflow ' + getDPL_global_options() + ' -n ' + str(args.ns) + simsoption + ' --onlyDet TPC --interactionRate ' + str(INTRATE) + ' --tpc-lanes ' + str(NWORKERS) + ' --incontext ' + str(CONTEXTFILE) + ' --tpc-chunked-writer --disable-write-ini ' + putConfigValuesNew(["TPCGasParam"])
671+
TPCDigitask['cmd'] += '${O2_ROOT}/bin/o2-sim-digitizer-workflow ' + getDPL_global_options() + ' -n ' + str(args.ns) + simsoption + ' --onlyDet TPC --interactionRate ' + str(INTRATE) + ' --tpc-lanes ' + str(NWORKERS) + ' --incontext ' + str(CONTEXTFILE) + ' --disable-write-ini ' + putConfigValuesNew(["TPCGasParam"])
672+
TPCDigitask['cmd'] += (' --tpc-chunked-writer','')[args.no_tpc_digitchunking]
671673
workflow['stages'].append(TPCDigitask)
672674

673675
trddigineeds = [ContextTask['name']]
@@ -757,8 +759,8 @@ def getDigiTaskName(det):
757759
taskname = 'tpcclusterpart' + str((int)(s/sectorpertask)) + '_' + str(tf)
758760
tpcclustertasks.append(taskname)
759761
tpcclussect = createTask(name=taskname, needs=[TPCDigitask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='2', mem='8000')
760-
tpcclussect['cmd'] = '${O2_ROOT}/bin/o2-tpc-chunkeddigit-merger --tpc-sectors ' + str(s)+'-'+str(s+sectorpertask-1) + ' --tpc-lanes ' + str(NWORKERS)
761-
tpcclussect['cmd'] += ' | ${O2_ROOT}/bin/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) + ' ' + putConfigValuesNew(["GPU_global"], {"GPU_proc.ompThreads" : 4})
762+
digitmergerstr = '${O2_ROOT}/bin/o2-tpc-chunkeddigit-merger --tpc-sectors ' + str(s)+'-'+str(s+sectorpertask-1) + ' --tpc-lanes ' + str(NWORKERS) + ' | '
763+
tpcclussect['cmd'] = (digitmergerstr,'')[args.no_tpc_digitchunking] + ' ${O2_ROOT}/bin/o2-tpc-reco-workflow ' + getDPL_global_options(bigshm=True) + ' --input-type ' + ('digitizer','digits')[args.no_tpc_digitchunking] + ' --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) + ' ' + putConfigValuesNew(["GPU_global"], {"GPU_proc.ompThreads" : 4})
762764
tpcclussect['env'] = { "OMP_NUM_THREADS" : "4", "SHMSIZE" : "16000000000" }
763765
tpcclussect['retry_count'] = 2 # the task has a race condition --> makes sense to retry
764766
workflow['stages'].append(tpcclussect)

0 commit comments

Comments
 (0)