Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions MC/bin/o2dpg_sim_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
parser.add_argument('--tpc-corrmap-lumi-mode', default=2, type=int, help='TPC corrections mode (0=linear, 1=derivative, 2=derivative for special MC maps')
parser.add_argument('--ctp-scaler', default=0, type=float, help='CTP raw scaler value used for distortion simulation')
parser.add_argument('--no-tpc-mt-digitizer', action='store_true', help='Digitize TPC with one process per lane instead of one multithreaded device')
parser.add_argument('--GeantMT', action='store_true', help='Run the Geant4 transport multi-threaded (o2-sim --isMT 1, needs -e TGeant4)')
parser.add_argument('--tpc-mt-digitizer', action='store_true', help=argparse.SUPPRESS) # the default now; kept for compatibility
parser.add_argument('--tpc-sector-seeding', action='store_true', help='Seed the TPC digitizer per sector so that the digits do not depend on the number of lanes')
# Global Forward reconstruction configuration
Expand Down Expand Up @@ -479,6 +480,11 @@ def extractVertexArgs(configKeyValuesStr, finalDiamondDict):

SKIPMODULES = " ".join(["--skipModules"] + args.skipModules) if len(args.skipModules) > 0 else ""
SIMENGINE=args.e
if args.GeantMT and SIMENGINE != 'TGeant4':
print('ERROR: --GeantMT needs -e TGeant4')
sys.exit(1)
# multi-threaded Geant4 transport, added to the o2-sim transport commands only
SIMMT = ' --isMT 1' if args.GeantMT else ''
# Geant4 is loaded by dlopen and needs a glibc static TLS reserve. It is set per task, because the global
# environment does not replace a GLIBC_TUNABLES that already exists, as it does truncated in GRID jobs.
GEANT4_TASK_ENV={'GLIBC_TUNABLES': 'glibc.rtld.optional_static_tls=32768'}
Expand Down Expand Up @@ -836,7 +842,7 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True, runcommand=True):

bkgsimneeds = [BKG_CONFIG_task['name'], GRP_TASK['name'], PreCollContextTask['name']]
BKGtask=createTask(name='bkgsim', lab=["GEANT"], needs=bkgsimneeds, cpu=NWORKERS)
BKGtask['cmd']='${O2_ROOT}/bin/o2-sim -e ' + SIMENGINE + ' -j ' + str(NWORKERS) + ' -n ' + str(NBKGEVENTS) \
BKGtask['cmd']='${O2_ROOT}/bin/o2-sim -e ' + SIMENGINE + SIMMT + ' -j ' + str(NWORKERS) + ' -n ' + str(NBKGEVENTS) \
+ ' -g ' + str(GENBKG) + ' ' + str(SKIPMODULES) + ' -o bkg ' + str(INIBKG) \
+ ' --field ccdb ' + str(CONFKEYBKG) \
+ ('',' --timestamp ' + str(args.timestamp))[args.timestamp!=-1] + ' --run ' + str(args.run) \
Expand Down Expand Up @@ -1057,7 +1063,7 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True, runcommand=True):
sgnmem = 6000 if COLTYPE == 'PbPb' else 4000
SGNtask=createTask(name='sgnsim_'+str(tf), needs=signalneeds, tf=tf, cwd='tf'+str(tf), lab=["GEANT"],
relative_cpu=7/8, n_workers=NWORKERS_TF, mem=str(sgnmem))
sgncmdbase = '${O2_ROOT}/bin/o2-sim -e ' + str(SIMENGINE) + ' ' + str(SKIPMODULES) + ' -n ' + str(NSIGEVENTS) + ' --seed ' + str(TFSEED) \
sgncmdbase = '${O2_ROOT}/bin/o2-sim -e ' + str(SIMENGINE) + SIMMT + ' ' + str(SKIPMODULES) + ' -n ' + str(NSIGEVENTS) + ' --seed ' + str(TFSEED) \
+ ' --field ccdb -j ' + str(NWORKERS_TF) + ' ' + str(CONFKEY) + ' ' + str(INIFILE) + ' -o ' + signalprefix + ' ' + embeddinto \
+ ' --detectorList ' + args.detectorList \
+ ('', ' --timestamp ' + str(args.timestamp))[args.timestamp!=-1] + ' --run ' + str(args.run)
Expand Down
Loading