#! /bin/bash -l
#
# This is a template for a batch job which you can use to submit
#
# See also this link on how to submit to batch queues
# https://twiki.atlas-canada.ca/bin/view/AtlasCanada/ATLASLocalRootBase2#Batch_Jobs
#
#
# Environment variables to pass on
export ALRB_testPath=",,,,"
export ALRB_CONT_SWTYPE="apptainer"
export ALRB_CONT_RUNPAYLOAD="source payload.sh"
export ALRB_CONT_PRESETUP="hostname -f; date; id -a"
export FRONTIER_SERVER="(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://atlasfrontier2-ai.cern.ch:8000/atlr)(serverurl=http://atlasfrontier1-ai.cern.ch:8000/atlr)(proxyurl=http://v4a.mwt2.org:6082)(proxyurl=http://v4f.hl-lhc.net:6082)(proxyurl=http://uct2-squid.mwt2.org:3128)(proxyurl=http://v4f.hl-lhc.net:6082)"
export SITE_NAME="MWT2"
# ideally setupATLAS is defined by the site admins. Just in case ....
alias | \grep -e "setupATLAS" > /dev/null 2>&1
if [ $? -ne 0 ]; then
typeset -f setupATLAS > /dev/null 2>&1
if [ $? -ne 0 ]; then
function setupATLAS
{
if [ -d /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase ]; then
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
source $ATLAS_LOCAL_ROOT_BASE/user/atlasLocalSetup.sh
return $?
else
\echo "Error: cvmfs atlas repo is unavailable"
return 64
fi
}
fi
fi
# setupATLAS -c <container> which will run and also return the exit code
# (setupATLAS is source /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/user/atlasLocalSetup.sh)
setupATLAS -c centos7
exit $?