Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions DATA/common/getCommonArgs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# used to avoid sourcing this file 2x
if [[ -z $SOURCE_GUARD_GETCOMMONARGS ]]; then
SOURCE_GUARD_GETCOMMONARGS=1

if [[ -z $SEVERITY || -z $NUMAID || -z $SHMSIZE || -z $FILEWORKDIR || -z $EPNSYNCMODE || -z $INFOLOGGER_SEVERITY || -z $SHMTHROW || -z $NORATELOG ]]; then
echo "Configuration Environment Variable Missing in getCommonArgs.sh" 1>&2
exit 1
Expand All @@ -18,3 +22,5 @@ fi
[[ $SHMTHROW == 0 ]] && ARGS_ALL+=" --shm-throw-bad-alloc 0"
[[ ! -z $SHM_MANAGER_SHMID && "0$GEN_TOPO_CALIB_WORKFLOW" != "01" ]] && ARGS_ALL+=" --no-cleanup --shm-no-cleanup on --shmid $SHM_MANAGER_SHMID"
[[ $NORATELOG == 1 ]] && ARGS_ALL+=" --fairmq-rate-logging 0"

fi # getCommonArgs.sh sourced
6 changes: 6 additions & 0 deletions DATA/common/setenv.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# used to avoid sourcing this file 2x
if [[ -z $SOURCE_GUARD_SETENV ]]; then
SOURCE_GUARD_SETENV=1

# Make sure we can open sufficiently many files / allocate enough memory
if [[ "0$SETENV_NO_ULIMIT" != "01" ]]; then
ulimit -S -n 4096 && ulimit -S -m unlimited && ulimit -S -v unlimited && [[ -z "$GPUTYPE" ]] || [[ "$GPUTYPE" == "CPU" ]] || ulimit -S -l unlimited
Expand Down Expand Up @@ -244,3 +248,5 @@ add_semicolon_separated()
fi
done
}

fi # setenv.sh sourced
5 changes: 4 additions & 1 deletion DATA/common/setenv_calib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
# if they are not explicitly disabled.
# Then, configure data spec according to enabled calibrations

source $O2DPG_ROOT/DATA/common/setenv.sh
# used to avoid sourcing this file 2x
if [[ -z $SOURCE_GUARD_SETENV_CALIB ]]; then
SOURCE_GUARD_SETENV_CALIB=1

if [[ $BEAMTYPE != "cosmic" ]] || [[ $FORCECALIBRATIONS == 1 ]] ; then

Expand Down Expand Up @@ -142,3 +144,4 @@ get_proxy_connection()
echo $PROXY_CONN

}
fi # setenv_calib.sh sourced