Skip to content

Commit f8a96de

Browse files
committed
Refactor of TPC clusterization configuration
* beautification of configuration * coupling to task-finalizer to be able to inject config-keys from outside * make sensitive to GPU_proc_nn for the ML clusterization keys
1 parent 44e1c0d commit f8a96de

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,22 @@ def getDigiTaskName(det):
12551255
tpcclustertasks.append(taskname)
12561256
tpcclussect = createTask(name=taskname, needs=tpcclusterneed, tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='2', mem='8000')
12571257
digitmergerstr = '${O2_ROOT}/bin/o2-tpc-chunkeddigit-merger --tpc-sectors ' + str(s)+'-'+str(s+sectorpertask-1) + ' --tpc-lanes ' + str(NWORKERS_TF) + ' | '
1258-
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 --tpc-native-cluster-writer \" --outfile tpc-native-clusters-part'+ str((int)(s/sectorpertask)) + '.root\" --tpc-sectors ' + str(s)+'-'+str(s+sectorpertask-1) + ' ' + putConfigValues(["GPU_global"], {"GPU_proc.ompThreads" : 4}) + ('',' --disable-mc')[args.no_mc_labels]
1258+
tpcclussect['cmd'] = (digitmergerstr,'')[args.no_tpc_digitchunking] + task_finalizer(
1259+
[
1260+
'${O2_ROOT}/bin/o2-tpc-reco-workflow',
1261+
getDPL_global_options(bigshm=True),
1262+
'--input-type ' + ('digitizer','digits')[args.no_tpc_digitchunking],
1263+
'--output-type clusters,send-clusters-per-sector',
1264+
f'--tpc-native-cluster-writer \" --outfile tpc-native-clusters-part{(int)(s/sectorpertask)}.root\"',
1265+
f'--tpc-sectors {s}-{s+sectorpertask-1}',
1266+
putConfigValues(["GPU_global",
1267+
"GPU_proc_nn",
1268+
"TPCCorrMap",
1269+
"TPCGasParam"], {"GPU_proc.ompThreads" : 4}),
1270+
'--disable-mc' if args.no_mc_labels else None
1271+
], configname="tpcclusterizertask"
1272+
)
1273+
12591274
tpcclussect['env'] = { "OMP_NUM_THREADS" : "4" , "TBB_NUM_THREADS" : "4" }
12601275
tpcclussect['semaphore'] = "tpctriggers.root"
12611276
tpcclussect['retry_count'] = 2 # the task has a race condition --> makes sense to retry
@@ -1266,6 +1281,7 @@ def getDigiTaskName(det):
12661281
workflow['stages'].append(TPCCLUSMERGEtask)
12671282
tpcreconeeds.append(TPCCLUSMERGEtask['name'])
12681283
else:
1284+
# TODO: adapt this to the case above and merge code / avoid code duplication
12691285
tpcclus = createTask(name='tpccluster_' + str(tf), needs=tpcclusterneed, tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu=NWORKERS_TF, mem='2000')
12701286
tpcclus['cmd'] = '${O2_ROOT}/bin/o2-tpc-chunkeddigit-merger --tpc-lanes ' + str(NWORKERS_TF)
12711287
tpcclus['cmd'] += ' | ${O2_ROOT}/bin/o2-tpc-reco-workflow ' + getDPL_global_options() + ' --input-type digitizer --output-type clusters,send-clusters-per-sector ' + putConfigValues(["GPU_global","TPCGasParam","TPCCorrMap"],{"GPU_proc.ompThreads" : 1}) + ('',' --disable-mc')[args.no_mc_labels]

0 commit comments

Comments
 (0)