Skip to content

Commit 928d82f

Browse files
Revert "[Anchor] Remove -k from QC run, return error code (#1513)" (#1515)
This reverts commit 0bb1b31.
1 parent 0bb1b31 commit 928d82f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

MC/run/ANCHOR/anchorMC.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ print_help()
4646
echo "ALIEN_JDL_SIMENGINE or SIMENGINE, choose the transport engine, default: TGeant4,"
4747
echo "ALIEN_JDL_WORKFLOWDETECTORS, set detectors to be taken into account, default: ITS,TPC,TOF,FV0,FT0,FDD,MID,MFT,MCH,TRD,EMC,PHS,CPV,HMP,CTP,"
4848
echo "ALIEN_JDL_ANCHOR_SIM_OPTIONS, additional options that are passed to the workflow creation, default: -gen pythia8,"
49-
echo "ALIEN_JDL_ADDTIMESERIESINMC, run TPC time series. Switch off by setting to 0, default: 1,"
50-
echo "ALIEN_JDL_ANCHOR_SIM_DISABLE_QC|ANCHOR_SIM_DISABLE_QC, set this to disable QC, e.g. to 1, default: 0,"
49+
echo "ALIEN_JDL_ADDTIMESERIESINMC, run TPC time series. Default: 1, switch off by setting to 0,"
50+
echo "DISABLE_QC, set this to disable QC, e.g. to 1"
5151
}
5252

5353
# Prevent the script from being soured to omit unexpected surprises when exit is used
@@ -85,7 +85,6 @@ export ALIEN_JDL_SIMENGINE=${ALIEN_JDL_SIMENGINE:-${SIMENGINE:-TGeant4}}
8585
export ALIEN_JDL_WORKFLOWDETECTORS=${ALIEN_JDL_WORKFLOWDETECTORS:-ITS,TPC,TOF,FV0,FT0,FDD,MID,MFT,MCH,TRD,EMC,PHS,CPV,HMP,CTP}
8686
# can be passed to contain additional options that will be passed to o2dpg_sim_workflow_anchored.py and eventually to o2dpg_sim_workflow.py
8787
export ALIEN_JDL_ANCHOR_SIM_OPTIONS=${ALIEN_JDL_ANCHOR_SIM_OPTIONS:--gen pythia8}
88-
export ALIEN_JDL_ANCHOR_SIM_DISABLE_QC=${ALIEN_JDL_ANCHOR_SIM_DISABLE_QC:-${ANCHOR_SIM_DISABLE_QC:-0}}
8988
# all others MUST be set by the user/on the outside
9089
export ALIEN_JDL_LPMANCHORPASSNAME=${ALIEN_JDL_LPMANCHORPASSNAME:-${ANCHORPASSNAME}}
9190
export ALIEN_JDL_MCANCHOR=${ALIEN_JDL_MCANCHOR:-${MCANCHOR}}
@@ -238,7 +237,7 @@ export FAIRMQ_IPC_PREFIX=./
238237

239238
echo "Ready to start main workflow"
240239

241-
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json -tt ${ALIEN_JDL_O2DPGWORKFLOWTARGET:-aod} --cpu-limit ${ALIEN_JDL_CPULIMIT}
240+
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json -tt ${ALIEN_JDL_O2DPGWORKFLOWTARGET:-aod} --cpu-limit ${ALIEN_JDL_CPULIMIT:-8}
242241
MCRC=$? # <--- we'll report back this code
243242

244243
if [[ "${ALIEN_JDL_ADDTIMESERIESINMC}" != "0" ]]; then
@@ -247,12 +246,14 @@ if [[ "${ALIEN_JDL_ADDTIMESERIESINMC}" != "0" ]]; then
247246
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json -tt tpctimes
248247
fi
249248

250-
[[ "${ALIEN_JDL_ANCHOR_SIM_DISABLE_QC}" != "0" ]] && echo "INFO: QC is disabled, skip it."
249+
[[ ! -z "${DISABLE_QC}" ]] && echo "INFO: QC is disabled, skip it."
251250

252-
if [[ "${ALIEN_JDL_ANCHOR_SIM_DISABLE_QC}" == "0" && "${MCRC}" = "0" && "${remainingargs}" == *"--include-local-qc"* ]] ; then
251+
if [[ -z "${DISABLE_QC}" && "${MCRC}" = "0" && "${remainingargs}" == *"--include-local-qc"* ]] ; then
253252
# do QC tasks
254253
echo "Doing QC"
255-
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json --target-labels QC --cpu-limit ${ALIEN_JDL_CPULIMIT}
254+
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json --target-labels QC --cpu-limit ${ALIEN_JDL_CPULIMIT:-8} -k
255+
# NOTE that with the -k|--keep-going option, the runner will try to keep on executing even if some tasks fail.
256+
# That means, even if there is a failing QC task, the return code will be 0
256257
MCRC=$?
257258
fi
258259

0 commit comments

Comments
 (0)