From 1fbf90e5d487838ed9f2612308e6466eb3b3b13b Mon Sep 17 00:00:00 2001 From: maciacco Date: Thu, 13 Feb 2025 17:26:10 +0100 Subject: [PATCH 1/5] set pw in test script + toggle ideal ITS in anchored simulation --- MC/run/ANCHOR/anchorMC.sh | 26 ++++++++++++------- .../tests/test_anchor_2023_apass2_pp.sh | 3 +++ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/MC/run/ANCHOR/anchorMC.sh b/MC/run/ANCHOR/anchorMC.sh index 0935b6ffb..a5df4b32d 100755 --- a/MC/run/ANCHOR/anchorMC.sh +++ b/MC/run/ANCHOR/anchorMC.sh @@ -299,20 +299,28 @@ if [ "${ISEXCLUDED}" ]; then fi # -- Create aligned geometry using ITS ideal alignment to avoid overlaps in geant -CCDBOBJECTS_IDEAL_MC="ITS/Calib/Align" -TIMESTAMP_IDEAL_MC=1 -${O2_ROOT}/bin/o2-ccdb-downloadccdbfile --host http://alice-ccdb.cern.ch/ -p ${CCDBOBJECTS_IDEAL_MC} -d ${ALICEO2_CCDB_LOCALCACHE} --timestamp ${TIMESTAMP_IDEAL_MC} -CCDB_RC="${?}" -if [ ! "${CCDB_RC}" == "0" ]; then - echo_error "Problem during CCDB prefetching of ${CCDBOBJECTS_IDEAL_MC}. Exiting." - exit ${CCDB_RC} +if [ "${ENABLE_PARALLEL_WORLD}" == "0" ]; then + CCDBOBJECTS_IDEAL_MC="ITS/Calib/Align" + TIMESTAMP_IDEAL_MC=1 + ${O2_ROOT}/bin/o2-ccdb-downloadccdbfile --host http://alice-ccdb.cern.ch/ -p ${CCDBOBJECTS_IDEAL_MC} -d ${ALICEO2_CCDB_LOCALCACHE} --timestamp ${TIMESTAMP_IDEAL_MC} + CCDB_RC="${?}" + if [ ! "${CCDB_RC}" == "0" ]; then + echo_error "Problem during CCDB prefetching of ${CCDBOBJECTS_IDEAL_MC}. Exiting." + exit ${CCDB_RC} + fi fi # TODO This can potentially be removed or if needed, should be taken over by o2dpg_sim_workflow_anchored.py and O2_dpg_workflow_runner.py -echo "run with echo in pipe" | ${O2_ROOT}/bin/o2-create-aligned-geometry-workflow --configKeyValues "HBFUtils.startTime=${TIMESTAMP}" --condition-remap=file://${ALICEO2_CCDB_LOCALCACHE}=ITS/Calib/Align -b --run +if [ "${ENABLE_PARALLEL_WORLD}" == "0" ]; then + echo "run with echo in pipe" | ${O2_ROOT}/bin/o2-create-aligned-geometry-workflow --configKeyValues "HBFUtils.startTime=${TIMESTAMP}" --condition-remap=file://${ALICEO2_CCDB_LOCALCACHE}=ITS/Calib/Align -b --run +else + echo "run with echo in pipe" | ${O2_ROOT}/bin/o2-create-aligned-geometry-workflow --configKeyValues "HBFUtils.startTime=${TIMESTAMP}" -b --run +fi mkdir -p $ALICEO2_CCDB_LOCALCACHE/GLO/Config/GeometryAligned ln -s -f $PWD/o2sim_geometry-aligned.root $ALICEO2_CCDB_LOCALCACHE/GLO/Config/GeometryAligned/snapshot.root -[[ -f $PWD/its_GeometryTGeo.root ]] && mkdir -p $ALICEO2_CCDB_LOCALCACHE/ITS/Config/Geometry && ln -s -f $PWD/its_GeometryTGeo.root $ALICEO2_CCDB_LOCALCACHE/ITS/Config/Geometry/snapshot.root +if [ "${ENABLE_PARALLEL_WORLD}" == "0" ]; then + [[ -f $PWD/its_GeometryTGeo.root ]] && mkdir -p $ALICEO2_CCDB_LOCALCACHE/ITS/Config/Geometry && ln -s -f $PWD/its_GeometryTGeo.root $ALICEO2_CCDB_LOCALCACHE/ITS/Config/Geometry/snapshot.root +fi [[ -f $PWD/mft_GeometryTGeo.root ]] && mkdir -p $ALICEO2_CCDB_LOCALCACHE/MFT/Config/Geometry && ln -s -f $PWD/mft_GeometryTGeo.root $ALICEO2_CCDB_LOCALCACHE/MFT/Config/Geometry/snapshot.root # -- RUN THE MC WORKLOAD TO PRODUCE AOD -- diff --git a/MC/run/ANCHOR/tests/test_anchor_2023_apass2_pp.sh b/MC/run/ANCHOR/tests/test_anchor_2023_apass2_pp.sh index 9d8378044..a399658f5 100755 --- a/MC/run/ANCHOR/tests/test_anchor_2023_apass2_pp.sh +++ b/MC/run/ANCHOR/tests/test_anchor_2023_apass2_pp.sh @@ -30,6 +30,9 @@ export SEED=5 # for pp and 50 events per TF, we launch only 4 workers. export NWORKERS=2 +export ENABLE_PARALLEL_WORLD=1 +export ALIEN_JDL_ANCHOR_SIM_OPTIONS="-gen pythia8 -confKey \"GeometryManagerParam.useParallelWorld=1;GeometryManagerParam.usePwGeoBVH=1;GeometryManagerParam.usePwCaching=1\"" + # run the central anchor steering script; this includes # * derive timestamp # * derive interaction rate From 6b6f4d1551a4a461e5dfd297fed761cc878da313 Mon Sep 17 00:00:00 2001 From: maciacco Date: Thu, 13 Feb 2025 17:52:09 +0100 Subject: [PATCH 2/5] remove duplicated flag for pw activation --- MC/run/ANCHOR/anchorMC.sh | 11 ++++++++--- MC/run/ANCHOR/tests/test_anchor_2023_apass2_pp.sh | 1 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/MC/run/ANCHOR/anchorMC.sh b/MC/run/ANCHOR/anchorMC.sh index a5df4b32d..1710fc806 100755 --- a/MC/run/ANCHOR/anchorMC.sh +++ b/MC/run/ANCHOR/anchorMC.sh @@ -299,7 +299,12 @@ if [ "${ISEXCLUDED}" ]; then fi # -- Create aligned geometry using ITS ideal alignment to avoid overlaps in geant -if [ "${ENABLE_PARALLEL_WORLD}" == "0" ]; then +ENABLEPW = 0 +if [[ $remainingargs == "GeometryManagerParam.useParallelWorld=1" ]]; then + ENABLEPW=1 +fi + +if [ "${ENABLEPW}" == "0" ]; then CCDBOBJECTS_IDEAL_MC="ITS/Calib/Align" TIMESTAMP_IDEAL_MC=1 ${O2_ROOT}/bin/o2-ccdb-downloadccdbfile --host http://alice-ccdb.cern.ch/ -p ${CCDBOBJECTS_IDEAL_MC} -d ${ALICEO2_CCDB_LOCALCACHE} --timestamp ${TIMESTAMP_IDEAL_MC} @@ -311,14 +316,14 @@ if [ "${ENABLE_PARALLEL_WORLD}" == "0" ]; then fi # TODO This can potentially be removed or if needed, should be taken over by o2dpg_sim_workflow_anchored.py and O2_dpg_workflow_runner.py -if [ "${ENABLE_PARALLEL_WORLD}" == "0" ]; then +if [ "${ENABLEPW}" == "0" ]; then echo "run with echo in pipe" | ${O2_ROOT}/bin/o2-create-aligned-geometry-workflow --configKeyValues "HBFUtils.startTime=${TIMESTAMP}" --condition-remap=file://${ALICEO2_CCDB_LOCALCACHE}=ITS/Calib/Align -b --run else echo "run with echo in pipe" | ${O2_ROOT}/bin/o2-create-aligned-geometry-workflow --configKeyValues "HBFUtils.startTime=${TIMESTAMP}" -b --run fi mkdir -p $ALICEO2_CCDB_LOCALCACHE/GLO/Config/GeometryAligned ln -s -f $PWD/o2sim_geometry-aligned.root $ALICEO2_CCDB_LOCALCACHE/GLO/Config/GeometryAligned/snapshot.root -if [ "${ENABLE_PARALLEL_WORLD}" == "0" ]; then +if [ "${ENABLEPW}" == "0" ]; then [[ -f $PWD/its_GeometryTGeo.root ]] && mkdir -p $ALICEO2_CCDB_LOCALCACHE/ITS/Config/Geometry && ln -s -f $PWD/its_GeometryTGeo.root $ALICEO2_CCDB_LOCALCACHE/ITS/Config/Geometry/snapshot.root fi [[ -f $PWD/mft_GeometryTGeo.root ]] && mkdir -p $ALICEO2_CCDB_LOCALCACHE/MFT/Config/Geometry && ln -s -f $PWD/mft_GeometryTGeo.root $ALICEO2_CCDB_LOCALCACHE/MFT/Config/Geometry/snapshot.root diff --git a/MC/run/ANCHOR/tests/test_anchor_2023_apass2_pp.sh b/MC/run/ANCHOR/tests/test_anchor_2023_apass2_pp.sh index a399658f5..32304f5dc 100755 --- a/MC/run/ANCHOR/tests/test_anchor_2023_apass2_pp.sh +++ b/MC/run/ANCHOR/tests/test_anchor_2023_apass2_pp.sh @@ -30,7 +30,6 @@ export SEED=5 # for pp and 50 events per TF, we launch only 4 workers. export NWORKERS=2 -export ENABLE_PARALLEL_WORLD=1 export ALIEN_JDL_ANCHOR_SIM_OPTIONS="-gen pythia8 -confKey \"GeometryManagerParam.useParallelWorld=1;GeometryManagerParam.usePwGeoBVH=1;GeometryManagerParam.usePwCaching=1\"" # run the central anchor steering script; this includes From 34b2502b64ef95c6958de561398f7e1dcb791586 Mon Sep 17 00:00:00 2001 From: maciacco Date: Thu, 13 Feb 2025 18:06:41 +0100 Subject: [PATCH 3/5] fix string check --- MC/run/ANCHOR/anchorMC.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MC/run/ANCHOR/anchorMC.sh b/MC/run/ANCHOR/anchorMC.sh index 1710fc806..9f49e574e 100755 --- a/MC/run/ANCHOR/anchorMC.sh +++ b/MC/run/ANCHOR/anchorMC.sh @@ -300,7 +300,7 @@ fi # -- Create aligned geometry using ITS ideal alignment to avoid overlaps in geant ENABLEPW = 0 -if [[ $remainingargs == "GeometryManagerParam.useParallelWorld=1" ]]; then +if [ ${remainingargs} == *"GeometryManagerParam.useParallelWorld=1"* ]; then ENABLEPW=1 fi From 5740a93028349421114f7344f58a1ea096852b49 Mon Sep 17 00:00:00 2001 From: maciacco Date: Thu, 13 Feb 2025 18:20:22 +0100 Subject: [PATCH 4/5] fix variable declaration --- MC/run/ANCHOR/anchorMC.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MC/run/ANCHOR/anchorMC.sh b/MC/run/ANCHOR/anchorMC.sh index 9f49e574e..6f2eb6285 100755 --- a/MC/run/ANCHOR/anchorMC.sh +++ b/MC/run/ANCHOR/anchorMC.sh @@ -299,7 +299,7 @@ if [ "${ISEXCLUDED}" ]; then fi # -- Create aligned geometry using ITS ideal alignment to avoid overlaps in geant -ENABLEPW = 0 +ENABLEPW=0 if [ ${remainingargs} == *"GeometryManagerParam.useParallelWorld=1"* ]; then ENABLEPW=1 fi From bc79fc14264a2cb8a999111a268c66369b5d8658 Mon Sep 17 00:00:00 2001 From: maciacco Date: Thu, 13 Feb 2025 18:27:13 +0100 Subject: [PATCH 5/5] fix check --- MC/run/ANCHOR/anchorMC.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MC/run/ANCHOR/anchorMC.sh b/MC/run/ANCHOR/anchorMC.sh index 6f2eb6285..998701115 100755 --- a/MC/run/ANCHOR/anchorMC.sh +++ b/MC/run/ANCHOR/anchorMC.sh @@ -300,7 +300,7 @@ fi # -- Create aligned geometry using ITS ideal alignment to avoid overlaps in geant ENABLEPW=0 -if [ ${remainingargs} == *"GeometryManagerParam.useParallelWorld=1"* ]; then +if [[ ${remainingargs} == *"GeometryManagerParam.useParallelWorld=1"* ]]; then ENABLEPW=1 fi