|
4 | 4 | if [[ -z $SOURCE_GUARD_SETENV ]]; then |
5 | 5 | SOURCE_GUARD_SETENV=1 |
6 | 6 |
|
7 | | -# Make sure we can open sufficiently many files / allocate enough memory |
8 | | -if [[ "0$SETENV_NO_ULIMIT" != "01" ]]; then |
9 | | - ulimit -S -n 4096 && ulimit -S -m unlimited && ulimit -S -v unlimited && [[ -z "$GPUTYPE" ]] || [[ "$GPUTYPE" == "CPU" ]] || ulimit -S -l unlimited |
10 | | - if [[ $? != 0 ]]; then |
11 | | - echo Error setting ulimits |
12 | | - exit 1 |
13 | | - fi |
14 | | -else |
15 | | - ULIMIT_S=`ulimit -S -n` |
16 | | - ULIMIT_H=`ulimit -H -n` |
17 | | - ULIMIT_REQ=4000 |
18 | | - if [[ $ULIMIT_H -gt $ULIMIT_S ]] && [[ $ULIMIT_S -lt $ULIMIT_REQ ]]; then |
19 | | - ulimit -S -n $(($ULIMIT_H > $ULIMIT_REQ ? $ULIMIT_REQ : $ULIMIT_H)) |
20 | | - fi |
21 | | - ULIMIT_FINAL=`ulimit -n` |
22 | | - if [[ $ULIMIT_FINAL -lt $ULIMIT_REQ ]]; then |
23 | | - echo "Could not raise 'ulimit -n' to $ULIMIT_REQ, running with $ULIMIT_FINAL" 1>&2 |
24 | | - fi |
25 | | -fi |
26 | | - |
27 | | -LIST_OF_DETECTORS="ITS,MFT,TPC,TOF,FT0,MID,EMC,PHS,CPV,ZDC,FDD,HMP,FV0,TRD,MCH,CTP" |
28 | | - |
29 | | -LIST_OF_GLORECO="ITSTPC,TPCTRD,ITSTPCTRD,TPCTOF,ITSTPCTOF,MFTMCH,MCHMID,PRIMVTX,SECVTX,AOD" |
30 | | - |
31 | | -LIST_OF_PID="FT0-TOF" |
32 | | - |
33 | | -# Detectors used in the workflow / enabled parameters |
34 | | -if [[ -z "${WORKFLOW_DETECTORS+x}" ]] || [[ "0$WORKFLOW_DETECTORS" == "0ALL" ]]; then export WORKFLOW_DETECTORS=$LIST_OF_DETECTORS; fi |
35 | | -if [[ -z "${WORKFLOW_DETECTORS_QC+x}" ]] || [[ "0$WORKFLOW_DETECTORS_QC" == "0ALL" ]]; then export WORKFLOW_DETECTORS_QC="$WORKFLOW_DETECTORS,$LIST_OF_GLORECO"; fi |
36 | | -if [[ -z "${WORKFLOW_DETECTORS_CALIB+x}" ]] || [[ "0$WORKFLOW_DETECTORS_CALIB" == "0ALL" ]]; then export WORKFLOW_DETECTORS_CALIB=$WORKFLOW_DETECTORS; fi |
37 | | -if [[ -z "${WORKFLOW_DETECTORS_RECO+x}" ]] || [[ "0$WORKFLOW_DETECTORS_RECO" == "0ALL" ]]; then export WORKFLOW_DETECTORS_RECO=$WORKFLOW_DETECTORS; fi |
38 | | -if [[ -z "${WORKFLOW_DETECTORS_CTF+x}" ]] || [[ "0$WORKFLOW_DETECTORS_CTF" == "0ALL" ]]; then export WORKFLOW_DETECTORS_CTF=$WORKFLOW_DETECTORS; fi |
39 | | -if [[ "0$WORKFLOW_DETECTORS_FLP_PROCESSING" == "0ALL" ]]; then export WORKFLOW_DETECTORS_FLP_PROCESSING=$WORKFLOW_DETECTORS; fi |
40 | | -if [[ -z "$WORKFLOW_PARAMETERS" ]]; then export WORKFLOW_PARAMETERS=; fi |
41 | | - |
42 | | -if [[ -z "$TFLOOP" ]]; then export TFLOOP=0; fi # loop over timeframes |
43 | | -if [[ -z "$NTIMEFRAMES" ]]; then export NTIMEFRAMES=-1; fi # max number of time frames to process, <=0 : unlimited |
44 | | -if [[ -z "$CTFDICT_NTF" ]]; then export CTFDICT_NTF=100; fi # auto-save CTF dictionary after each CTFDICT_NTF TFs (if > 0) |
45 | | -if [[ -z "$CTF_MAXDETEXT" ]]; then export CTF_MAXDETEXT=0; fi # extend CTF output dir.name by detectors names if their number does not exceed this |
46 | | -if [[ -z "$TFDELAY" ]]; then export TFDELAY=100; fi # Delay in seconds between publishing time frames |
47 | | -if [[ -z "$GPUTYPE" ]]; then export GPUTYPE=CPU; fi # GPU Tracking backend to use, can be CPU / CUDA / HIP / OCL / OCL2 |
48 | | -if [[ -z "$DDSHMSIZE" ]]; then export DDSHMSIZE=$(( 8 << 10 )); fi # Size of shared memory for DD Input |
49 | | -if [[ -z "$DDHDRSIZE" ]]; then export DDHDRSIZE=$(( 1 << 10 )); fi # Size of shared memory for DD Input |
50 | | -if [[ -z "$GPUMEMSIZE" ]]; then export GPUMEMSIZE=$(( 24 << 30 )); fi # Size of allocated GPU memory (if GPUTYPE != CPU) |
51 | | -if [[ -z "$HOSTMEMSIZE" ]]; then export HOSTMEMSIZE=0; fi # Size of allocated host memory for GPU reconstruction (0 = default) |
52 | | -if [[ -z "$CREATECTFDICT" ]]; then export CREATECTFDICT=0; fi # Create CTF dictionary |
53 | | -if [[ -z "$SAVECTF" ]]; then export SAVECTF=0; fi # Save the CTF to a ROOT file |
54 | | -if [[ -z "$SYNCMODE" ]]; then export SYNCMODE=0; fi # Run only reconstruction steps of the synchronous reconstruction |
55 | | -if [[ -z "$NUMAID" ]]; then export NUMAID=0; fi # SHM segment id to use for shipping data as well as set of GPUs to use (use 0 / 1 for 2 NUMA domains) |
56 | | -if [[ -z "$NUMAGPUIDS" ]]; then export NUMAGPUIDS=0; fi # NUMAID-aware GPU id selection |
57 | | -if [[ -z "$CTFINPUT" ]]; then export CTFINPUT=0; fi # Read input from CTF using o2-ctf-reader (incompatible to EXTINPUT=1 and RAWTFINPUT) |
58 | | -if [[ -z "$RAWTFINPUT" ]]; then export RAWTFINPUT=0; fi # Read input from raw TFs using o2-raw-tf-reader (incompatible to EXTINPUT=1 and CTFINPUT=1) |
59 | | -if [[ -z "$DIGITINPUT" ]]; then export DIGITINPUT=0; fi # Read input from digit files (incompatible to EXTINPUT / CTFINPUT / RAWTFINPUT) |
60 | | -if [[ -z "$NHBPERTF" ]]; then export NHBPERTF=128; fi # Time frame length (in HBF) |
61 | | -if [[ -z "$GLOBALDPLOPT" ]]; then export GLOBALDPLOPT=; fi # Global DPL workflow options appended at the end |
62 | | -if [[ -z "$SEVERITY" ]]; then export SEVERITY="info"; fi # Log verbosity |
63 | | -if [[ -z "$NORATELOG" ]]; then export NORATELOG=1; fi # Disable FairMQ Rate Logging |
64 | | -if [[ -z "$INRAWCHANNAME" ]]; then export INRAWCHANNAME=stfb-to-dpl; fi # Raw channel name used to communicate with DataDistribution |
65 | | -if [[ -z "$WORKFLOWMODE" ]]; then export WORKFLOWMODE=run; fi # Workflow mode, must be run, print, od dds |
66 | | -if [[ -z "$FILEWORKDIR" ]]; then export FILEWORKDIR=`pwd`; fi # Override folder where to find grp, etc. |
67 | | -if [[ -z $FILEWORKDIRRUN ]]; then export FILEWORKDIRRUN=$FILEWORKDIR; fi # directory where to find the run-related files (grp, collision context) |
68 | | -if [[ -z "$RAWINPUTDIR" ]]; then export RAWINPUTDIR=$FILEWORKDIR; fi # Directory where to find input files (raw files / raw tf files / ctf files) |
69 | | -if [[ -z "$EPNSYNCMODE" ]]; then export EPNSYNCMODE=0; fi # Is this workflow supposed to run on EPN for sync processing? Will enable InfoLogger / metrics / fetching QC JSONs from consul... |
70 | | -if [[ -z "$BEAMTYPE" ]]; then export BEAMTYPE=PbPb; fi # Beam type, must be PbPb, pp, pPb, cosmic, technical |
71 | | -if [[ -z "$RUNTYPE" ]]; then export RUNTYPE=Standalone; fi # Run Type, standalone for local tests, otherwise PHYSICS, COSMICS, TECHNICAL, SYNTHETIC |
72 | | -if [[ -z $IS_SIMULATED_DATA ]]; then export IS_SIMULATED_DATA=1; fi # processing simulated data |
73 | | -if [[ $EPNSYNCMODE == 0 ]]; then |
74 | | - if [[ -z "$SHMSIZE" ]]; then export SHMSIZE=$(( 8 << 30 )); fi # Size of shared memory for messages |
75 | | - if [[ -z "$NGPUS" ]]; then export NGPUS=1; fi # Number of GPUs to use, data distributed round-robin |
76 | | - if [[ -z "$EXTINPUT" ]]; then export EXTINPUT=0; fi # Receive input from raw FMQ channel instead of running o2-raw-file-reader |
77 | | - if [[ -z "$EPNPIPELINES" ]]; then export EPNPIPELINES=0; fi # Set default EPN pipeline multiplicities |
78 | | - if [[ -z "$SHMTHROW" ]]; then export SHMTHROW=1; fi # Throw exception when running out of SHM |
79 | | - if [[ -z "$EDJSONS_DIR" ]]; then export EDJSONS_DIR="jsons"; fi # output directory for ED json files |
80 | | - if [[ -z "${WORKFLOW_DETECTORS_FLP_PROCESSING+x}" ]]; then export WORKFLOW_DETECTORS_FLP_PROCESSING=""; fi # No FLP processing by default when we do not run the sync EPN workflow, e.g. full system test will also run full FLP processing |
81 | | -else # Defaults when running on the EPN |
82 | | - if [[ "0$GEN_TOPO_CALIB_WORKFLOW" != "01" ]]; then |
83 | | - if [[ -z $GEN_TOPO_CALIB_NCORES ]]; then |
84 | | - if [[ -z "$SHMSIZE" ]]; then export SHMSIZE=$(( 32 << 30 )); fi |
85 | | - else |
86 | | - if [[ -z "$SHMSIZE" ]]; then export SHMSIZE=$(( ($GEN_TOPO_CALIB_NCORES * 2) << 30 )); fi |
87 | | - fi |
88 | | - else |
89 | | - if [[ -z "$SHMSIZE" ]]; then export SHMSIZE=$(( 112 << 30 )); fi |
90 | | - fi |
91 | | - if [[ -z "$NGPUS" ]]; then export NGPUS=4; fi |
92 | | - if [[ -z "$EXTINPUT" ]]; then export EXTINPUT=1; fi |
93 | | - if [[ -z "$EPNPIPELINES" ]]; then export EPNPIPELINES=1; fi |
94 | | - if [[ -z "$SHMTHROW" ]]; then export SHMTHROW=0; fi |
95 | | - if [[ -z "$TIMEFRAME_SHM_LIMIT" ]]; then export TIMEFRAME_SHM_LIMIT=$(( $SHMSIZE / 2 )); fi |
96 | | - if [[ -z "$EDJSONS_DIR" ]]; then export EDJSONS_DIR="/scratch/services/ed/jsons_${RUNTYPE}"; fi |
97 | | - if [[ -z "${WORKFLOW_DETECTORS_FLP_PROCESSING+x}" ]]; then export WORKFLOW_DETECTORS_FLP_PROCESSING="TOF"; fi # Current default in sync processing is that FLP processing is only enabled for TOF |
98 | | - if [[ -z "$GEN_TOPO_AUTOSCALE_PROCESSES" ]]; then export GEN_TOPO_AUTOSCALE_PROCESSES=1; fi # On the EPN we should make sure to always use the node to the full extent |
99 | | -fi |
100 | | -# Some more options for running on the EPN |
101 | | -if [[ -z "$INFOLOGGER_SEVERITY" ]]; then export INFOLOGGER_SEVERITY="important"; fi |
102 | | -if [[ -z "$MULTIPLICITY_FACTOR_RAWDECODERS" ]]; then export MULTIPLICITY_FACTOR_RAWDECODERS=1; fi |
103 | | -if [[ -z "$MULTIPLICITY_FACTOR_CTFENCODERS" ]]; then export MULTIPLICITY_FACTOR_CTFENCODERS=1; fi |
104 | | -if [[ -z "$MULTIPLICITY_FACTOR_REST" ]]; then export MULTIPLICITY_FACTOR_REST=1; fi |
105 | | - |
106 | | -[[ -z "${SEVERITY_TPC+x}" ]] && SEVERITY_TPC="info" # overrides severity for the tpc workflow |
107 | | -[[ -z "${DISABLE_MC+x}" ]] && DISABLE_MC="--disable-mc" |
108 | | -[[ -z "${DISABLE_ROOT_OUTPUT+x}" ]] && DISABLE_ROOT_OUTPUT="--disable-root-output" |
109 | | - |
110 | | -if [[ `uname` == Darwin ]]; then export UDS_PREFIX=; else export UDS_PREFIX="@"; fi |
111 | | - |
112 | | -if [[ $(( $EXTINPUT + $CTFINPUT + $RAWTFINPUT + $DIGITINPUT )) -ge 2 ]]; then |
113 | | - echo Only one of EXTINPUT / CTFINPUT / RAWTFINPUT / DIGITINPUT must be set |
114 | | - exit 1 |
115 | | -fi |
116 | | -if [[ $SAVECTF == 1 ]] && [[ $CTFINPUT == 1 ]]; then |
117 | | - echo SAVECTF and CTFINPUT are incompatible |
118 | | - exit 1 |
119 | | -fi |
120 | | -if [[ $SYNCMODE == 1 ]] && [[ $CTFINPUT == 1 ]]; then |
121 | | - echo SYNCMODE and CTFINPUT are incompatible |
122 | | - exit 1 |
123 | | -fi |
124 | | -if [[ $WORKFLOWMODE != "run" ]] && [[ $WORKFLOWMODE != "print" ]] && [[ $WORKFLOWMODE != "dds" ]] && [[ $WORKFLOWMODE != "dump" ]]; then |
125 | | - echo Invalid workflow mode |
126 | | - exit 1 |
127 | | -fi |
128 | | - |
129 | 7 | has_detector() |
130 | 8 | { |
131 | 9 | [[ $WORKFLOW_DETECTORS =~ (^|,)"$1"(,|$) ]] |
@@ -277,4 +155,129 @@ add_semicolon_separated() |
277 | 155 | done |
278 | 156 | } |
279 | 157 |
|
| 158 | +# Make sure we can open sufficiently many files / allocate enough memory |
| 159 | +if [[ "0$SETENV_NO_ULIMIT" != "01" ]]; then |
| 160 | + ulimit -S -n 4096 && ulimit -S -m unlimited && ulimit -S -v unlimited && [[ -z "$GPUTYPE" ]] || [[ "$GPUTYPE" == "CPU" ]] || ulimit -S -l unlimited |
| 161 | + if [[ $? != 0 ]]; then |
| 162 | + echo Error setting ulimits |
| 163 | + exit 1 |
| 164 | + fi |
| 165 | +else |
| 166 | + ULIMIT_S=`ulimit -S -n` |
| 167 | + ULIMIT_H=`ulimit -H -n` |
| 168 | + ULIMIT_REQ=4000 |
| 169 | + if [[ $ULIMIT_H -gt $ULIMIT_S ]] && [[ $ULIMIT_S -lt $ULIMIT_REQ ]]; then |
| 170 | + ulimit -S -n $(($ULIMIT_H > $ULIMIT_REQ ? $ULIMIT_REQ : $ULIMIT_H)) |
| 171 | + fi |
| 172 | + ULIMIT_FINAL=`ulimit -n` |
| 173 | + if [[ $ULIMIT_FINAL -lt $ULIMIT_REQ ]]; then |
| 174 | + echo "Could not raise 'ulimit -n' to $ULIMIT_REQ, running with $ULIMIT_FINAL" 1>&2 |
| 175 | + fi |
| 176 | +fi |
| 177 | + |
| 178 | +LIST_OF_DETECTORS="ITS,MFT,TPC,TOF,FT0,MID,EMC,PHS,CPV,ZDC,FDD,HMP,FV0,TRD,MCH,CTP" |
| 179 | + |
| 180 | +LIST_OF_GLORECO="ITSTPC,TPCTRD,ITSTPCTRD,TPCTOF,ITSTPCTOF,MFTMCH,MCHMID,PRIMVTX,SECVTX,AOD" |
| 181 | + |
| 182 | +LIST_OF_PID="FT0-TOF" |
| 183 | + |
| 184 | +# Detectors used in the workflow / enabled parameters |
| 185 | +if [[ -z "${WORKFLOW_DETECTORS+x}" ]] || [[ "0$WORKFLOW_DETECTORS" == "0ALL" ]]; then export WORKFLOW_DETECTORS=$LIST_OF_DETECTORS; fi |
| 186 | +# temporary manual addition of CTP if ADD_CTP is requested, to be removed when ECS will start including CTP/TRG to the list of detectors. |
| 187 | +! has_detector CTP && [[ ! -z "${ADD_CTP+x}" ]] && add_comma_separated WORKFLOW_DETECTORS CTP |
| 188 | +if [[ -z "${WORKFLOW_DETECTORS_QC+x}" ]] || [[ "0$WORKFLOW_DETECTORS_QC" == "0ALL" ]]; then export WORKFLOW_DETECTORS_QC="$WORKFLOW_DETECTORS,$LIST_OF_GLORECO"; fi |
| 189 | +if [[ -z "${WORKFLOW_DETECTORS_CALIB+x}" ]] || [[ "0$WORKFLOW_DETECTORS_CALIB" == "0ALL" ]]; then export WORKFLOW_DETECTORS_CALIB=$WORKFLOW_DETECTORS; fi |
| 190 | +if [[ -z "${WORKFLOW_DETECTORS_RECO+x}" ]] || [[ "0$WORKFLOW_DETECTORS_RECO" == "0ALL" ]]; then export WORKFLOW_DETECTORS_RECO=$WORKFLOW_DETECTORS; fi |
| 191 | +if [[ -z "${WORKFLOW_DETECTORS_CTF+x}" ]] || [[ "0$WORKFLOW_DETECTORS_CTF" == "0ALL" ]]; then export WORKFLOW_DETECTORS_CTF=$WORKFLOW_DETECTORS; fi |
| 192 | +if [[ "0$WORKFLOW_DETECTORS_FLP_PROCESSING" == "0ALL" ]]; then export WORKFLOW_DETECTORS_FLP_PROCESSING=$WORKFLOW_DETECTORS; fi |
| 193 | +if [[ -z "$WORKFLOW_PARAMETERS" ]]; then export WORKFLOW_PARAMETERS=; fi |
| 194 | + |
| 195 | +if [[ -z "$TFLOOP" ]]; then export TFLOOP=0; fi # loop over timeframes |
| 196 | +if [[ -z "$NTIMEFRAMES" ]]; then export NTIMEFRAMES=-1; fi # max number of time frames to process, <=0 : unlimited |
| 197 | +if [[ -z "$CTFDICT_NTF" ]]; then export CTFDICT_NTF=100; fi # auto-save CTF dictionary after each CTFDICT_NTF TFs (if > 0) |
| 198 | +if [[ -z "$CTF_MAXDETEXT" ]]; then export CTF_MAXDETEXT=0; fi # extend CTF output dir.name by detectors names if their number does not exceed this |
| 199 | +if [[ -z "$TFDELAY" ]]; then export TFDELAY=100; fi # Delay in seconds between publishing time frames |
| 200 | +if [[ -z "$GPUTYPE" ]]; then export GPUTYPE=CPU; fi # GPU Tracking backend to use, can be CPU / CUDA / HIP / OCL / OCL2 |
| 201 | +if [[ -z "$DDSHMSIZE" ]]; then export DDSHMSIZE=$(( 8 << 10 )); fi # Size of shared memory for DD Input |
| 202 | +if [[ -z "$DDHDRSIZE" ]]; then export DDHDRSIZE=$(( 1 << 10 )); fi # Size of shared memory for DD Input |
| 203 | +if [[ -z "$GPUMEMSIZE" ]]; then export GPUMEMSIZE=$(( 24 << 30 )); fi # Size of allocated GPU memory (if GPUTYPE != CPU) |
| 204 | +if [[ -z "$HOSTMEMSIZE" ]]; then export HOSTMEMSIZE=0; fi # Size of allocated host memory for GPU reconstruction (0 = default) |
| 205 | +if [[ -z "$CREATECTFDICT" ]]; then export CREATECTFDICT=0; fi # Create CTF dictionary |
| 206 | +if [[ -z "$SAVECTF" ]]; then export SAVECTF=0; fi # Save the CTF to a ROOT file |
| 207 | +if [[ -z "$SYNCMODE" ]]; then export SYNCMODE=0; fi # Run only reconstruction steps of the synchronous reconstruction |
| 208 | +if [[ -z "$NUMAID" ]]; then export NUMAID=0; fi # SHM segment id to use for shipping data as well as set of GPUs to use (use 0 / 1 for 2 NUMA domains) |
| 209 | +if [[ -z "$NUMAGPUIDS" ]]; then export NUMAGPUIDS=0; fi # NUMAID-aware GPU id selection |
| 210 | +if [[ -z "$CTFINPUT" ]]; then export CTFINPUT=0; fi # Read input from CTF using o2-ctf-reader (incompatible to EXTINPUT=1 and RAWTFINPUT) |
| 211 | +if [[ -z "$RAWTFINPUT" ]]; then export RAWTFINPUT=0; fi # Read input from raw TFs using o2-raw-tf-reader (incompatible to EXTINPUT=1 and CTFINPUT=1) |
| 212 | +if [[ -z "$DIGITINPUT" ]]; then export DIGITINPUT=0; fi # Read input from digit files (incompatible to EXTINPUT / CTFINPUT / RAWTFINPUT) |
| 213 | +if [[ -z "$NHBPERTF" ]]; then export NHBPERTF=128; fi # Time frame length (in HBF) |
| 214 | +if [[ -z "$GLOBALDPLOPT" ]]; then export GLOBALDPLOPT=; fi # Global DPL workflow options appended at the end |
| 215 | +if [[ -z "$SEVERITY" ]]; then export SEVERITY="info"; fi # Log verbosity |
| 216 | +if [[ -z "$NORATELOG" ]]; then export NORATELOG=1; fi # Disable FairMQ Rate Logging |
| 217 | +if [[ -z "$INRAWCHANNAME" ]]; then export INRAWCHANNAME=stfb-to-dpl; fi # Raw channel name used to communicate with DataDistribution |
| 218 | +if [[ -z "$WORKFLOWMODE" ]]; then export WORKFLOWMODE=run; fi # Workflow mode, must be run, print, od dds |
| 219 | +if [[ -z "$FILEWORKDIR" ]]; then export FILEWORKDIR=`pwd`; fi # Override folder where to find grp, etc. |
| 220 | +if [[ -z $FILEWORKDIRRUN ]]; then export FILEWORKDIRRUN=$FILEWORKDIR; fi # directory where to find the run-related files (grp, collision context) |
| 221 | +if [[ -z "$RAWINPUTDIR" ]]; then export RAWINPUTDIR=$FILEWORKDIR; fi # Directory where to find input files (raw files / raw tf files / ctf files) |
| 222 | +if [[ -z "$EPNSYNCMODE" ]]; then export EPNSYNCMODE=0; fi # Is this workflow supposed to run on EPN for sync processing? Will enable InfoLogger / metrics / fetching QC JSONs from consul... |
| 223 | +if [[ -z "$BEAMTYPE" ]]; then export BEAMTYPE=PbPb; fi # Beam type, must be PbPb, pp, pPb, cosmic, technical |
| 224 | +if [[ -z "$RUNTYPE" ]]; then export RUNTYPE=Standalone; fi # Run Type, standalone for local tests, otherwise PHYSICS, COSMICS, TECHNICAL, SYNTHETIC |
| 225 | +if [[ -z $IS_SIMULATED_DATA ]]; then export IS_SIMULATED_DATA=1; fi # processing simulated data |
| 226 | +if [[ $EPNSYNCMODE == 0 ]]; then |
| 227 | + if [[ -z "$SHMSIZE" ]]; then export SHMSIZE=$(( 8 << 30 )); fi # Size of shared memory for messages |
| 228 | + if [[ -z "$NGPUS" ]]; then export NGPUS=1; fi # Number of GPUs to use, data distributed round-robin |
| 229 | + if [[ -z "$EXTINPUT" ]]; then export EXTINPUT=0; fi # Receive input from raw FMQ channel instead of running o2-raw-file-reader |
| 230 | + if [[ -z "$EPNPIPELINES" ]]; then export EPNPIPELINES=0; fi # Set default EPN pipeline multiplicities |
| 231 | + if [[ -z "$SHMTHROW" ]]; then export SHMTHROW=1; fi # Throw exception when running out of SHM |
| 232 | + if [[ -z "$EDJSONS_DIR" ]]; then export EDJSONS_DIR="jsons"; fi # output directory for ED json files |
| 233 | + if [[ -z "${WORKFLOW_DETECTORS_FLP_PROCESSING+x}" ]]; then export WORKFLOW_DETECTORS_FLP_PROCESSING=""; fi # No FLP processing by default when we do not run the sync EPN workflow, e.g. full system test will also run full FLP processing |
| 234 | +else # Defaults when running on the EPN |
| 235 | + if [[ "0$GEN_TOPO_CALIB_WORKFLOW" != "01" ]]; then |
| 236 | + if [[ -z $GEN_TOPO_CALIB_NCORES ]]; then |
| 237 | + if [[ -z "$SHMSIZE" ]]; then export SHMSIZE=$(( 32 << 30 )); fi |
| 238 | + else |
| 239 | + if [[ -z "$SHMSIZE" ]]; then export SHMSIZE=$(( ($GEN_TOPO_CALIB_NCORES * 2) << 30 )); fi |
| 240 | + fi |
| 241 | + else |
| 242 | + if [[ -z "$SHMSIZE" ]]; then export SHMSIZE=$(( 112 << 30 )); fi |
| 243 | + fi |
| 244 | + if [[ -z "$NGPUS" ]]; then export NGPUS=4; fi |
| 245 | + if [[ -z "$EXTINPUT" ]]; then export EXTINPUT=1; fi |
| 246 | + if [[ -z "$EPNPIPELINES" ]]; then export EPNPIPELINES=1; fi |
| 247 | + if [[ -z "$SHMTHROW" ]]; then export SHMTHROW=0; fi |
| 248 | + if [[ -z "$TIMEFRAME_SHM_LIMIT" ]]; then export TIMEFRAME_SHM_LIMIT=$(( $SHMSIZE / 2 )); fi |
| 249 | + if [[ -z "$EDJSONS_DIR" ]]; then export EDJSONS_DIR="/scratch/services/ed/jsons_${RUNTYPE}"; fi |
| 250 | + if [[ -z "${WORKFLOW_DETECTORS_FLP_PROCESSING+x}" ]]; then export WORKFLOW_DETECTORS_FLP_PROCESSING="TOF"; fi # Current default in sync processing is that FLP processing is only enabled for TOF |
| 251 | + if [[ -z "$GEN_TOPO_AUTOSCALE_PROCESSES" ]]; then export GEN_TOPO_AUTOSCALE_PROCESSES=1; fi # On the EPN we should make sure to always use the node to the full extent |
| 252 | +fi |
| 253 | +# Some more options for running on the EPN |
| 254 | +if [[ -z "$INFOLOGGER_SEVERITY" ]]; then export INFOLOGGER_SEVERITY="important"; fi |
| 255 | +if [[ -z "$MULTIPLICITY_FACTOR_RAWDECODERS" ]]; then export MULTIPLICITY_FACTOR_RAWDECODERS=1; fi |
| 256 | +if [[ -z "$MULTIPLICITY_FACTOR_CTFENCODERS" ]]; then export MULTIPLICITY_FACTOR_CTFENCODERS=1; fi |
| 257 | +if [[ -z "$MULTIPLICITY_FACTOR_REST" ]]; then export MULTIPLICITY_FACTOR_REST=1; fi |
| 258 | + |
| 259 | +[[ -z "${SEVERITY_TPC+x}" ]] && SEVERITY_TPC="info" # overrides severity for the tpc workflow |
| 260 | +[[ -z "${DISABLE_MC+x}" ]] && DISABLE_MC="--disable-mc" |
| 261 | +[[ -z "${DISABLE_ROOT_OUTPUT+x}" ]] && DISABLE_ROOT_OUTPUT="--disable-root-output" |
| 262 | + |
| 263 | +if [[ `uname` == Darwin ]]; then export UDS_PREFIX=; else export UDS_PREFIX="@"; fi |
| 264 | + |
| 265 | +if [[ $(( $EXTINPUT + $CTFINPUT + $RAWTFINPUT + $DIGITINPUT )) -ge 2 ]]; then |
| 266 | + echo Only one of EXTINPUT / CTFINPUT / RAWTFINPUT / DIGITINPUT must be set |
| 267 | + exit 1 |
| 268 | +fi |
| 269 | +if [[ $SAVECTF == 1 ]] && [[ $CTFINPUT == 1 ]]; then |
| 270 | + echo SAVECTF and CTFINPUT are incompatible |
| 271 | + exit 1 |
| 272 | +fi |
| 273 | +if [[ $SYNCMODE == 1 ]] && [[ $CTFINPUT == 1 ]]; then |
| 274 | + echo SYNCMODE and CTFINPUT are incompatible |
| 275 | + exit 1 |
| 276 | +fi |
| 277 | +if [[ $WORKFLOWMODE != "run" ]] && [[ $WORKFLOWMODE != "print" ]] && [[ $WORKFLOWMODE != "dds" ]] && [[ $WORKFLOWMODE != "dump" ]]; then |
| 278 | + echo Invalid workflow mode |
| 279 | + exit 1 |
| 280 | +fi |
| 281 | + |
| 282 | + |
280 | 283 | fi # setenv.sh sourced |
0 commit comments