Skip to content
Snippets Groups Projects
Commit 3a544793 authored by Anne Philipp's avatar Anne Philipp
Browse files

added automatic python3 loading on ECMWF servers in setup and run scripts

parent a916e8fb
No related branches found
No related tags found
No related merge requests found
...@@ -55,6 +55,12 @@ pyscript=../Source/Python/submit.py ...@@ -55,6 +55,12 @@ pyscript=../Source/Python/submit.py
# INITIALIZE EMPTY PARAMETERLIST # INITIALIZE EMPTY PARAMETERLIST
parameterlist="" parameterlist=""
# CHECK IF ON ECMWF SERVER;
if [[ $HOST == *"ecgb"* ]] || [[ $HOST == *"cca"* ]] || [[ $HOST == *"ccb"* ]]; then
# LOAD PYTHON3 MODULE
module load python3
fi
# CHECK FOR MORE PARAMETER # CHECK FOR MORE PARAMETER
if [ -n "$START_DATE" ]; then if [ -n "$START_DATE" ]; then
parameterlist+=" --start_date=$START_DATE" parameterlist+=" --start_date=$START_DATE"
......
...@@ -46,6 +46,12 @@ script="Source/Python/install.py" ...@@ -46,6 +46,12 @@ script="Source/Python/install.py"
# INITIALIZE EMPTY PARAMETERLIST # INITIALIZE EMPTY PARAMETERLIST
parameterlist="" parameterlist=""
# CHECK IF ON ECMWF SERVER;
if [[ $HOST == *"ecgb"* ]] || [[ $HOST == *"cca"* ]] || [[ $HOST == *"ccb"* ]]; then
# LOAD PYTHON3 MODULE
module load python3
fi
# DEFAULT PARAMETERLIST # DEFAULT PARAMETERLIST
if [ -n "$TARGET" ]; then if [ -n "$TARGET" ]; then
parameterlist=" --target=$TARGET" parameterlist=" --target=$TARGET"
...@@ -56,7 +62,7 @@ else ...@@ -56,7 +62,7 @@ else
fi fi
# CHECK FOR MORE PARAMETER # CHECK FOR MORE PARAMETER
if [ "$TARGET" == "ecgate" ] || [ "$TARGET" == "cca" ]; then if [ "$TARGET" == "ecgate" ] || [ "$TARGET" == "cca" ] || [ "$TARGET" == "ccb" ]; then
# check if necessary Parameters are set # check if necessary Parameters are set
if [ -z "$ECUID" ] || [ -z "$ECGID" ] || [ "$ECUID" == "<username>" ] || [ "$ECGID" == "<groupID>" ] ; then if [ -z "$ECUID" ] || [ -z "$ECGID" ] || [ "$ECUID" == "<username>" ] || [ "$ECGID" == "<groupID>" ] ; then
echo "ERROR: At least one of the following parameters are not properly set: ECUID or ECGID!" echo "ERROR: At least one of the following parameters are not properly set: ECUID or ECGID!"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment