|
58 | 58 | # arguments for background event caching |
59 | 59 | parser.add_argument('--upload-bkg-to',help='where to upload background event files (alien path)') |
60 | 60 | parser.add_argument('--use-bkg-from',help='take background event from given alien path') |
| 61 | + |
| 62 | +# argument for early cleanup |
| 63 | +parser.add_argument('--early-tf-cleanup',action='store_true', help='whether to cleanup intermediate artefacts after each timeframe is done') |
| 64 | + |
61 | 65 | # power feature (for playing) --> does not appear in help message |
62 | 66 | # help='Treat smaller sensors in a single digitization') |
63 | 67 | parser.add_argument('--combine-smaller-digi', action='store_true', help=argparse.SUPPRESS) |
@@ -441,6 +445,7 @@ def createRestDigiTask(name, det='ALLSMALLER'): |
441 | 445 | tpcclussect = createTask(name=taskname, needs=[TPCDigitask['name']], tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='1', mem='2000') |
442 | 446 | tpcclussect['cmd'] = 'o2-tpc-chunkeddigit-merger --tpc-sectors ' + str(s) + ' --rate 1000 --tpc-lanes ' + str(NWORKERS) |
443 | 447 | 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"' |
| 448 | + tpcclussect['env'] = { "OMP_NUM_THREADS" : "1" } # we disable OpenMP since running in scalar mode anyway |
444 | 449 | workflow['stages'].append(tpcclussect) |
445 | 450 |
|
446 | 451 | TPCCLUSMERGEtask=createTask(name='tpcclustermerge_'+str(tf), needs=tpcclustertasks, tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='1') |
@@ -510,6 +515,19 @@ def createRestDigiTask(name, det='ALLSMALLER'): |
510 | 515 | AOD_merge_task['semaphore'] = 'aodmerge' #<---- this is making sure that only one merge is running at any time |
511 | 516 | workflow['stages'].append(AOD_merge_task) |
512 | 517 |
|
| 518 | + # cleanup |
| 519 | + # -------- |
| 520 | + # On the GRID it may be important to cleanup as soon as possible because disc space |
| 521 | + # is limited (which would restrict the number of timeframes). We offer a timeframe cleanup function |
| 522 | + # taking away digits, clusters and other stuff as soon as possible. |
| 523 | + # TODO: cleanup by labels or task names |
| 524 | + if args.early_tf_cleanup == True: |
| 525 | + TFcleanup = createTask(name='tfcleanup_'+str(tf), needs= [ AOD_merge_task['name'] ], tf=tf, cwd=timeframeworkdir, lab=["CLEANUP"], mem='0', cpu='1') |
| 526 | + TFcleanup['cmd'] = 'rm *digi*.root;' |
| 527 | + TFcleanup['cmd'] += 'rm *cluster*.root' |
| 528 | + workflow['stages'].append(TFcleanup); |
| 529 | + |
| 530 | + |
513 | 531 | def trimString(cmd): |
514 | 532 | return ' '.join(cmd.split()) |
515 | 533 |
|
|
0 commit comments