diff --git a/prodtests/full-system-test/async_tmux.sh b/prodtests/full-system-test/async_tmux.sh index 396d03077295c..80bab4969ed83 100755 --- a/prodtests/full-system-test/async_tmux.sh +++ b/prodtests/full-system-test/async_tmux.sh @@ -1,7 +1,7 @@ #!/bin/bash -MYDIR="$(dirname $(realpath $0))" -source $MYDIR/setenv.sh +[[ -z $GEN_TOPO_MYDIR ]] && GEN_TOPO_MYDIR="$(dirname $(realpath $0))" +source $GEN_TOPO_MYDIR/setenv.sh # This sets up the hardcoded configuration to run the async full system test workflow on the EPN if [ $GPUTYPE == "CPU" ]; then @@ -36,6 +36,6 @@ export NTIMEFRAMES=$((($NTIMEFRAMES + 1) / 2)) rm -f /dev/shm/*fmq* tmux -L ASYNC \ - new-session "sleep 0; NUMAID=0 $MYDIR/dpl-workflow.sh $LOGCMD0; $ENDCMD" \; \ - split-window "sleep 2; NUMAID=1 $MYDIR/dpl-workflow.sh $LOGCMD1; $ENDCMD" \; \ + new-session "sleep 0; NUMAID=0 $GEN_TOPO_MYDIR/dpl-workflow.sh $LOGCMD0; $ENDCMD" \; \ + split-window "sleep 2; NUMAID=1 $GEN_TOPO_MYDIR/dpl-workflow.sh $LOGCMD1; $ENDCMD" \; \ select-layout even-vertical diff --git a/prodtests/full-system-test/calib-workflow.sh b/prodtests/full-system-test/calib-workflow.sh index c0db7b64b7ee0..2a850ba3babdd 100644 --- a/prodtests/full-system-test/calib-workflow.sh +++ b/prodtests/full-system-test/calib-workflow.sh @@ -3,7 +3,7 @@ source $O2DPG_ROOT/DATA/common/setenv.sh source $O2DPG_ROOT/DATA/common/setenv_calib.sh -if [[ -z "$WORKFLOW" ]] || [[ -z "$MYDIR" ]]; then +if [[ -z "$WORKFLOW" ]] || [[ -z "$GEN_TOPO_MYDIR" ]]; then echo This script must be called from the dpl-workflow.sh and not standalone 1>&2 exit 1 fi diff --git a/prodtests/full-system-test/datadistribution.sh b/prodtests/full-system-test/datadistribution.sh index f07a845e9c81c..03ed1354d1d3f 100755 --- a/prodtests/full-system-test/datadistribution.sh +++ b/prodtests/full-system-test/datadistribution.sh @@ -1,7 +1,7 @@ #!/bin/bash -MYDIR="$(dirname $(realpath $0))" -source $MYDIR/setenv.sh +[[ -z $GEN_TOPO_MYDIR ]] && GEN_TOPO_MYDIR="$(dirname $(realpath $0))" +source $GEN_TOPO_MYDIR/setenv.sh if [[ `which StfBuilder 2> /dev/null | wc -l` == "0" ]]; then eval "`alienv shell-helper`" diff --git a/prodtests/full-system-test/dpl-workflow.sh b/prodtests/full-system-test/dpl-workflow.sh old mode 100755 new mode 100644 index 25a1200ce0c47..795b36b560e11 --- a/prodtests/full-system-test/dpl-workflow.sh +++ b/prodtests/full-system-test/dpl-workflow.sh @@ -2,8 +2,9 @@ # --------------------------------------------------------------------------------------------------------------------- # Get this script's directory and load common settings (use zsh first (e.g. on Mac) and fallback on `readlink -f` if zsh is not there) -MYDIR="$(dirname $(realpath $0))" -source $MYDIR/setenv.sh +[[ -z $GEN_TOPO_MYDIR ]] && GEN_TOPO_MYDIR="$(dirname $(realpath $0))" +source $GEN_TOPO_MYDIR/gen_topo_helper_functions.sh +source $GEN_TOPO_MYDIR/setenv.sh if [[ $EPNSYNCMODE == 0 && $DPL_CONDITION_BACKEND != "http://o2-ccdb.internal" && $DPL_CONDITION_BACKEND != "http://localhost:8084" && $DPL_CONDITION_BACKEND != "http://127.0.0.1:8084" ]]; then alien-token-info >& /dev/null @@ -25,8 +26,8 @@ workflow_has_parameter GPU && { export GPUTYPE=HIP; export NGPUS=4; } # --------------------------------------------------------------------------------------------------------------------- # Set general arguments -source $MYDIR/getCommonArgs.sh -source $MYDIR/workflow-setup.sh +source $GEN_TOPO_MYDIR/getCommonArgs.sh +source $GEN_TOPO_MYDIR/workflow-setup.sh workflow_has_parameter CALIB && { source $O2DPG_ROOT/DATA/common/setenv_calib.sh; [[ $? != 0 ]] && exit 1; } [[ -z $SHM_MANAGER_SHMID ]] && ( [[ $EXTINPUT == 1 ]] || [[ $NUMAGPUIDS != 0 ]] ) && ARGS_ALL+=" --no-cleanup" @@ -465,8 +466,8 @@ fi # --------------------------------------------------------------------------------------------------------------------- # Calibration workflows -workflow_has_parameter CALIB && { source ${CALIB_WF:-$MYDIR/calib-workflow.sh}; [[ $? != 0 ]] && exit 1; } -workflow_has_parameters CALIB CALIB_LOCAL_INTEGRATED_AGGREGATOR && { source ${CALIB_AGGREGATOR_WF:-$MYDIR/aggregator-workflow.sh}; [[ $? != 0 ]] && exit 1; } +workflow_has_parameter CALIB && { source ${CALIB_WF:-$GEN_TOPO_MYDIR/calib-workflow.sh}; [[ $? != 0 ]] && exit 1; } +workflow_has_parameters CALIB CALIB_LOCAL_INTEGRATED_AGGREGATOR && { source ${CALIB_AGGREGATOR_WF:-$GEN_TOPO_MYDIR/aggregator-workflow.sh}; [[ $? != 0 ]] && exit 1; } # --------------------------------------------------------------------------------------------------------------------- # Event display diff --git a/prodtests/full-system-test/raw-reader.sh b/prodtests/full-system-test/raw-reader.sh index 816747c16436f..cea10a66c6099 100755 --- a/prodtests/full-system-test/raw-reader.sh +++ b/prodtests/full-system-test/raw-reader.sh @@ -5,8 +5,8 @@ if [ "0$O2_ROOT" == "0" ]; then alienv --no-refresh load O2/latest fi -MYDIR="$(dirname $(realpath $0))" -source $MYDIR/setenv.sh +[[ -z $GEN_TOPO_MYDIR ]] && GEN_TOPO_MYDIR="$(dirname $(realpath $0))" +source $GEN_TOPO_MYDIR/setenv.sh ARGS_ALL="--session ${OVERRIDE_SESSION:-default} --shm-throw-bad-alloc 0 --no-cleanup" if [[ $NUMAGPUIDS == 1 ]]; then diff --git a/prodtests/full-system-test/run-workflow-on-inputlist.sh b/prodtests/full-system-test/run-workflow-on-inputlist.sh index dd07ada6d65b7..fdfff18f9b7c2 100755 --- a/prodtests/full-system-test/run-workflow-on-inputlist.sh +++ b/prodtests/full-system-test/run-workflow-on-inputlist.sh @@ -1,6 +1,6 @@ #!/bin/bash -MYDIR="$(dirname $(realpath $0))" +[[ -z $GEN_TOPO_MYDIR ]] && GEN_TOPO_MYDIR="$(dirname $(realpath $0))" if [[ -z $1 || -z $2 ]]; then echo "ERROR: Command line arguments missing. Syntax: run-workflow-on-inputlist.sh [CTF | DD | TF] [name of file with list of files to be processed] [Timeout in seconds (optional: default = disabled)] [Log to stdout (optional: default = enabled)]" @@ -60,7 +60,7 @@ echo "Processing $2 in $1 mode" if [[ $1 == "DD" ]]; then export EXTINPUT=1 export DD_STARTUP_DELAY=5 - start_process $MYDIR/datadistribution.sh + start_process $GEN_TOPO_MYDIR/datadistribution.sh elif [[ $1 == "CTF" ]]; then export CTFINPUT=1 elif [[ $1 == "TF" ]]; then @@ -72,7 +72,7 @@ else exit 1 fi -start_process ${DPL_WORKFLOW_FROM_OUTSIDE:-$MYDIR/dpl-workflow.sh} +start_process ${DPL_WORKFLOW_FROM_OUTSIDE:-$GEN_TOPO_MYDIR/dpl-workflow.sh} if [[ "0$4" != "00" ]]; then sleep 1 diff --git a/prodtests/full-system-test/shm-tool.sh b/prodtests/full-system-test/shm-tool.sh index 91be384d89b52..2e3cf97299de1 100755 --- a/prodtests/full-system-test/shm-tool.sh +++ b/prodtests/full-system-test/shm-tool.sh @@ -3,7 +3,7 @@ [[ -z $SHMSIZE ]] && export SHMSIZE=$(( 112 << 30 )) # Please keep these defaults in sync with those in start_tmux.sh [[ -z $DDSHMSIZE ]] && export DDSHMSIZE=$(( 112 << 10 )) -MYDIR="$(dirname $(realpath $0))" -source $MYDIR/setenv.sh +[[ -z $GEN_TOPO_MYDIR ]] && GEN_TOPO_MYDIR="$(dirname $(realpath $0))" +source $GEN_TOPO_MYDIR/setenv.sh o2-epn-shm-manager --shmid $SHM_MANAGER_SHMID --segments 0,$SHMSIZE,0 1,$SHMSIZE,1 2,$((10<<20)),-1 --regions 100,$(($DDSHMSIZE << 20)),-1 101,$(($DDHDRSIZE << 20)),-1 --nozero diff --git a/prodtests/full-system-test/start_tmux.sh b/prodtests/full-system-test/start_tmux.sh index 0776a0df55438..c072ee8dd822b 100755 --- a/prodtests/full-system-test/start_tmux.sh +++ b/prodtests/full-system-test/start_tmux.sh @@ -22,8 +22,8 @@ if [[ -z "${WORKFLOW_PARAMETERS+x}" ]]; then fi [[ -z "${SEVERITY}" ]] && export SEVERITY="important" -MYDIR="$(dirname $(realpath $0))" -source $MYDIR/setenv.sh +[[ -z $GEN_TOPO_MYDIR ]] && GEN_TOPO_MYDIR="$(dirname $(realpath $0))" +source $GEN_TOPO_MYDIR/setenv.sh if [[ "0$FST_TMUX_NO_EPN" != "01" ]]; then # This sets up the hardcoded configuration to run the full system workflow on the EPN @@ -110,16 +110,16 @@ if [[ ! -z $FST_TMUX_SINGLENUMA ]]; then fi if workflow_has_parameter CALIB_PROXIES; then - CALIB_COMMAND="$MYDIR/aggregator-workflow.sh" + CALIB_COMMAND="$GEN_TOPO_MYDIR/aggregator-workflow.sh" CALIB_TASKS="BARREL_TF CALO_TF FORWARD_TF BARREL_SPORADIC" # CALO_SPORADIC MUON_TF MUON_SPORADIC else CALIB_TASKS= fi if [ "0$FST_TMUX_BATCH_MODE" == "01" ]; then - { sleep $FST_SLEEP0; eval "NUMAID=0 $MYDIR/dpl-workflow.sh ${LOGCMD/\[REPLACE]/0}"; eval "$ENDCMD"; } & - { sleep $FST_SLEEP1; eval "NUMAID=1 $MYDIR/dpl-workflow.sh ${LOGCMD/\[REPLACE]/1}"; eval "$ENDCMD"; } & - { sleep $FST_SLEEP2; eval "SEVERITY=debug numactl --interleave=all $MYDIR/$CMD ${LOGCMD/\[REPLACE]/2}"; eval "$KILLCMD $ENDCMD"; } & + { sleep $FST_SLEEP0; eval "NUMAID=0 $GEN_TOPO_MYDIR/dpl-workflow.sh ${LOGCMD/\[REPLACE]/0}"; eval "$ENDCMD"; } & + { sleep $FST_SLEEP1; eval "NUMAID=1 $GEN_TOPO_MYDIR/dpl-workflow.sh ${LOGCMD/\[REPLACE]/1}"; eval "$ENDCMD"; } & + { sleep $FST_SLEEP2; eval "SEVERITY=debug numactl --interleave=all $GEN_TOPO_MYDIR/$CMD ${LOGCMD/\[REPLACE]/2}"; eval "$KILLCMD $ENDCMD"; } & for i in $CALIB_TASKS; do { eval "AGGREGATOR_TASKS=$i $CALIB_COMMAND ${LOGCMD/\[REPLACE]/3_${i}}"; eval "$ENDCMD"; } & done @@ -127,11 +127,11 @@ if [ "0$FST_TMUX_BATCH_MODE" == "01" ]; then else TMUX_SPLIT_COMMAND="split-window" TMUX_COMMAND="tmux -L FST" - TMUX_COMMAND+=" new-session \"sleep $FST_SLEEP0; NUMAID=0 $MYDIR/dpl-workflow.sh ${LOGCMD/\[REPLACE]/0}; $ENDCMD\" ';'" + TMUX_COMMAND+=" new-session \"sleep $FST_SLEEP0; NUMAID=0 $GEN_TOPO_MYDIR/dpl-workflow.sh ${LOGCMD/\[REPLACE]/0}; $ENDCMD\" ';'" for i in `seq 1 $(($NUM_DPL_WORKFLOWS - 1))`; do - TMUX_COMMAND+=" $TMUX_SPLIT_COMMAND \"sleep $FST_SLEEP1; NUMAID=$i $MYDIR/dpl-workflow.sh ${LOGCMD/\[REPLACE]/1}; $ENDCMD\" ';'" + TMUX_COMMAND+=" $TMUX_SPLIT_COMMAND \"sleep $FST_SLEEP1; NUMAID=$i $GEN_TOPO_MYDIR/dpl-workflow.sh ${LOGCMD/\[REPLACE]/1}; $ENDCMD\" ';'" done - TMUX_COMMAND+=" $TMUX_SPLIT_COMMAND \"sleep $FST_SLEEP2; SEVERITY=debug numactl --interleave=all $MYDIR/$CMD; $KILLCMD $ENDCMD\" ';'" + TMUX_COMMAND+=" $TMUX_SPLIT_COMMAND \"sleep $FST_SLEEP2; SEVERITY=debug numactl --interleave=all $GEN_TOPO_MYDIR/$CMD; $KILLCMD $ENDCMD\" ';'" FIRST_CALIB=1 for i in $CALIB_TASKS; do TMUX_COMMAND+=" $TMUX_SPLIT_COMMAND \"AGGREGATOR_TASKS=$i $CALIB_COMMAND ${LOGCMD/\[REPLACE]/3_${i}}; $ENDCMD\" ';'" diff --git a/prodtests/full-system-test/tf-reader.sh b/prodtests/full-system-test/tf-reader.sh index 8fcedea9c52ae..7eae8e4a351b1 100755 --- a/prodtests/full-system-test/tf-reader.sh +++ b/prodtests/full-system-test/tf-reader.sh @@ -5,8 +5,8 @@ if [ "0$O2_ROOT" == "0" ]; then alienv --no-refresh load O2/latest fi -MYDIR="$(dirname $(realpath $0))" -source $MYDIR/setenv.sh +[[ -z $GEN_TOPO_MYDIR ]] && GEN_TOPO_MYDIR="$(dirname $(realpath $0))" +source $GEN_TOPO_MYDIR/setenv.sh ARGS_ALL="--session ${OVERRIDE_SESSION:-default} --shm-throw-bad-alloc 0 --no-cleanup" if [[ $NUMAGPUIDS == 1 ]]; then