|
73 | 73 | # power feature (for playing) --> does not appear in help message |
74 | 74 | # help='Treat smaller sensors in a single digitization') |
75 | 75 | parser.add_argument('--combine-smaller-digi', action='store_true', help=argparse.SUPPRESS) |
| 76 | +parser.add_argument('--combine-tpc-clusterization', action='store_true', help=argparse.SUPPRESS) #<--- useful for small productions (pp, low interaction rate, small number of events) |
76 | 77 |
|
77 | 78 | args = parser.parse_args() |
78 | 79 | print (args) |
@@ -434,24 +435,32 @@ def createRestDigiTask(name, det='ALLSMALLER'): |
434 | 435 | # ----------- |
435 | 436 | # reco |
436 | 437 | # ----------- |
| 438 | + tpcreconeeds=[] |
| 439 | + if not args.combine_tpc_clusterization: |
| 440 | + # TODO: check value for MaxTimeBin; A large value had to be set tmp in order to avoid crashes based on "exceeding timeframe limit" |
| 441 | + # We treat TPC clusterization in multiple (sector) steps in order to stay within the memory limit |
| 442 | + tpcclustertasks=[] |
| 443 | + for s in range(0,35): |
| 444 | + taskname = 'tpcclusterpart' + str(s) + '_' + str(tf) |
| 445 | + tpcclustertasks.append(taskname) |
| 446 | + tpcclussect = createTask(name=taskname, needs=[TPCDigitask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='1', mem='2000') |
| 447 | + tpcclussect['cmd'] = 'o2-tpc-chunkeddigit-merger --tpc-sectors ' + str(s) + ' --rate 1000 --tpc-lanes ' + str(NWORKERS) |
| 448 | + 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(s) + '.root --tpc-sectors ' + str(s) + ' --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads=1"' |
| 449 | + tpcclussect['env'] = { "OMP_NUM_THREADS" : "1" } # we disable OpenMP since running in scalar mode anyway |
| 450 | + workflow['stages'].append(tpcclussect) |
| 451 | + |
| 452 | + TPCCLUSMERGEtask=createTask(name='tpcclustermerge_'+str(tf), needs=tpcclustertasks, tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='1') |
| 453 | + TPCCLUSMERGEtask['cmd']='o2-commonutils-treemergertool -i tpc-native-clusters-part*.root -o tpc-native-clusters.root -t tpcrec' #--asfriend preferable but does not work |
| 454 | + workflow['stages'].append(TPCCLUSMERGEtask) |
| 455 | + tpcreconeeds.append(TPCCLUSMERGEtask['name']) |
| 456 | + else: |
| 457 | + tpcclus = createTask(name='tpccluster_' + str(tf), needs=[TPCDigitask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu=NWORKERS, mem='2000') |
| 458 | + tpcclus['cmd'] = 'o2-tpc-chunkeddigit-merger --rate 1000 --tpc-lanes ' + str(NWORKERS) |
| 459 | + tpcclus['cmd'] += ' | o2-tpc-reco-workflow ' + getDPL_global_options() + ' --input-type digitizer --output-type clusters,send-clusters-per-sector --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads=1"' |
| 460 | + workflow['stages'].append(tpcclus) |
| 461 | + tpcreconeeds.append(tpcclus['name']) |
437 | 462 |
|
438 | | - # TODO: check value for MaxTimeBin; A large value had to be set tmp in order to avoid crashes based on "exceeding timeframe limit" |
439 | | - # We treat TPC clusterization in multiple (sector) steps in order to stay within the memory limit |
440 | | - tpcclustertasks=[] |
441 | | - for s in range(0,35): |
442 | | - taskname = 'tpcclusterpart' + str(s) + '_' + str(tf) |
443 | | - tpcclustertasks.append(taskname) |
444 | | - tpcclussect = createTask(name=taskname, needs=[TPCDigitask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='1', mem='2000') |
445 | | - tpcclussect['cmd'] = 'o2-tpc-chunkeddigit-merger --tpc-sectors ' + str(s) + ' --rate 1000 --tpc-lanes ' + str(NWORKERS) |
446 | | - 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(s) + '.root --tpc-sectors ' + str(s) + ' --configKeyValues "GPU_global.continuousMaxTimeBin=100000;GPU_proc.ompThreads=1"' |
447 | | - tpcclussect['env'] = { "OMP_NUM_THREADS" : "1" } # we disable OpenMP since running in scalar mode anyway |
448 | | - workflow['stages'].append(tpcclussect) |
449 | | - |
450 | | - TPCCLUSMERGEtask=createTask(name='tpcclustermerge_'+str(tf), needs=tpcclustertasks, tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='1') |
451 | | - TPCCLUSMERGEtask['cmd']='o2-commonutils-treemergertool -i tpc-native-clusters-part*.root -o tpc-native-clusters.root -t tpcrec' #--asfriend preferable but does not work |
452 | | - workflow['stages'].append(TPCCLUSMERGEtask) |
453 | | - |
454 | | - TPCRECOtask=createTask(name='tpcreco_'+str(tf), needs=[TPCCLUSMERGEtask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], relative_cpu=3/8, mem='16000') |
| 463 | + TPCRECOtask=createTask(name='tpcreco_'+str(tf), needs=tpcreconeeds, tf=tf, cwd=timeframeworkdir, lab=["RECO"], relative_cpu=3/8, mem='16000') |
455 | 464 | 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)+'"' |
456 | 465 | workflow['stages'].append(TPCRECOtask) |
457 | 466 |
|
|
0 commit comments