[RTA DPA BW Tests] Improve configurability of tests from top-level scripts
Aim
Currently for proper local running there's several flags/ defaults that need changing across multiple files, this MR instead allows clearer local usage by strictly requiring some relevant environment variables to be configured when running.
Changes
Main changes
!449 (a92dd23f) + !449 (60275ae8) + !449 (f29e4d5c)
For example: Moore_bandwidth_test.sh
now has:
"""
Requires the following environment variables to be set, see e.g. Moore_hlt2_bandwidth.sh for an example:
{HLT1, HLT2, SPRUCE}_EVTMAX: maximum number of events to process in the selection processing job
BASEDIR: location for the output directories
DOWNLOAD_INPUT_LOCALLY: flag to download the input files for the selection processing jobs.
BUILD_PAGES_LOCALLY: flag to make the webpages' links navigable locally
HLT2_THREADS: flag to determine hlt2 threads used __if LBN_BUILD_JOBS is not set__.
HLT1_INPUT_CONFIG: Override the default hlt1 input config, '' evaluates to default.
{HLT1, HLT2, SPRUCE}_INPUT_CONFIG: Override the default input config in the selection processing job, '' evaluates to default.
"""
This way we ensure that the options can't become 'invisibly broken', and it's easy for users who want to run locally to see the 'easy-to-reach levers' they have access to as they're defined verbatim in the wrapper functions (i.e. Moore_hlt2_bandwidth.sh
etc.)
Required a minor hacky solution in hlt2_and_spruce_bandwidth{, _SMOG2}.sh
to allow the Moore qmts to wrap these scripts and still configure the variables they need to
# Override variables necessary to easily run qmts in CI
export EVTMAX=${OVERRIDE_EVTMAX:1e5}
Automatically track RawBanks to persist
Closes #30 with !449 (f6d3ca4b)
Local Testing
Collapsible
main change
With Moore_hlt2_bandwidth.sh changed thusly:
-export EVTMAX=1e5
-export BASEDIR=tmp
+export EVTMAX=100
+export BASEDIR=tmp__tmp_test
export DOWNLOAD_INPUT_LOCALLY=true
-export BUILD_PAGES_LOCALLY=false
-export HLT2_THREADS=1
+export BUILD_PAGES_LOCALLY=true
+export HLT2_THREADS=10
export HLT1_INPUT_CONFIG=''
export HLT2_INPUT_CONFIG=''
export SPRUCE_INPUT_CONFIG=''
Everything makes sense with no errors. Specifically:
- The evts were appropriately truncated
- The results did got to
tmp__tmp_test
- as expected:
|-n_threads = 10 (default: 1)
i.e. = HLT2_THREADS - Pages are correctly navigable locally
Further changing Moore_hlt2_bandwidth.sh
like so:
-export BASEDIR=tmp
-export DOWNLOAD_INPUT_LOCALLY=true
+export BASEDIR=tmp__tmp_test_SMOG2
+export DOWNLOAD_INPUT_LOCALLY=false
+export BUILD_PAGES_LOCALLY=true
-export HLT2_INPUT_CONFIG=''
+export HLT2_INPUT_CONFIG='/storage/epp2/phrhbm/modern_stack/Moore/Hlt/Hlt2Conf/tests/options/bandwidth/hlt2_bandwidth_input_2024_withSMOG2.yaml'
- as expected:
|-input_files = ['mdf:root://eoslhcb.cern.ch//eos/lhcb/wg/IonPhysics/Simulations/MixedEvents_pAr_nu037/hlt1_filtered/hlt1_mixedsample_Job0.mdf',...
i.e. is using the SMOG2 input samples, and not locally downloaded.
All the variables seem to be working
Automatically track RawBanks to persist
Checked that there's no difference between the previous (hardcoded values) and the new (generated values)
ToDo
-
CI-test with a Moore MR on 2024-patches
: lhcb/Moore!3837 -
CI-test with a Moore MR on master
: lhcb/Moore!4010 -
Review