Skip to content

Commit 987b4ad

Browse files
committed
Prefetch CCDB objects for anchored MC
We use prefetching and CCDB_CACHING mechanism to serve the CCDB objects for MC. Otherwise, they would currently not be fetched at a consistent timestamp (in line with the run). See https://alice.its.cern.ch/jira/browse/O2-2852.
1 parent af9c1ee commit 987b4ad

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

MC/run/ANCHOR/2021/OCT/pass4/anchorMC.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,25 @@ remainingargs="${remainingargs} --anchor-config config-json.json"
9494
echo "baseargs: ${baseargs}"
9595
echo "remainingargs: ${remainingargs}"
9696

97-
${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow_anchored.py ${baseargs} -- ${remainingargs}
97+
${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow_anchored.py ${baseargs} -- ${remainingargs} &> timestampsampling.log
98+
99+
TIMESTAMP=`grep "Determined timestamp to be" timestampsampling.log | awk '//{print $6}'`
100+
echo "TIMESTAMP IS ${TIMESTAMP}"
101+
102+
# -- PREFETCH CCDB OBJECTS TO DISC --
103+
# (make sure the right objects at the right timestamp are fetched
104+
# until https://alice.its.cern.ch/jira/browse/O2-2852 is fixed)
105+
export ALICEO2_CCDB_LOCALCACHE=$PWD/.ccdb
106+
[ ! -d .ccdb ] && mkdir .ccdb
107+
108+
for p in /GLO/Config/GRPMagField/ /GLO/Config/GRPLHCIF /ITS/Align /ITS/Calib/DeadMap /ITS/Calib/NoiseMap /ITS/Calib/ClusterDictionary /TPC/Align /TPC/Calib/PadGainFull /TPC/Calib/TopologyGain /TPC/Calib/TimeGain /TPC/Calib/PadGainResidual /TPC/Config/FEEPad /TRD/Align /TOF/Align /TOF/Calib/Diagnostic /TOF/Calib/LHCphase /TOF/Calib/FEELIGHT /TOF/Calib/ChannelCalib /PHS/Align /CPV/Align /EMC/Align /HMP/Align /MFT/Align /MFT/Calib/DeadMap /MFT/Calib/NoiseMap /MFT/Calib/ClusterDictionary /MCH/Align /MID/Align /FT0/Align /FT0/Calibration/ChannelTimeOffset /FV0/Align /FV0/Calibration/ChannelTimeOffset /FDD/Align /CTP/Calib/OrbitReset; do
109+
${O2_ROOT}/bin/o2-ccdb-downloadccdbfile --host http://alice-ccdb.cern.ch/ -p ${p} -d .ccdb --timestamp ${TIMESTAMP}
110+
done
111+
98112
# -- RUN THE MC WORKLOAD TO PRODUCE AOD --
99113

100114
export FAIRMQ_IPC_PREFIX=./
101-
export ALICEO2_CCDB_LOCALCACHE=$PWD/.ccdb
115+
102116
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json -tt ${ALIEN_JDL_O2DPGWORKFLOWTARGET:-aod} --cpu-limit ${ALIEN_JDL_CPULIMIT:-8}
103117
MCRC=$? # <--- we'll report back this code
104118

@@ -137,7 +151,6 @@ fi
137151
#
138152
if [[ -n "$ALIEN_PROC_ID" ]]; then
139153
find ./ \( -name "*.log*" -o -name "*mergerlog*" -o -name "*serverlog*" -o -name "*workerlog*" \) | tar -czvf debug_log_archive.tgz -T -
140-
#find ./ \( -name "*.log*" -o -name "*mergerlog*" -o -name "*serverlog*" -o -name "*workerlog*" \) | tar cfJ debug_log_archive.xz -T -
141154
fi
142155

143156
unset FAIRMQ_IPC_PREFIX

0 commit comments

Comments
 (0)