source: flex_extract.git/setup_local_bologna.sh

dev
Last change on this file was c31ee05, checked in by Anne Tipka <anne.tipka@…>, 18 months ago

added loading of ecaccess module in submit script and adjusted installscript to Bologna environment

  • Property mode set to 100755
File size: 3.0 KB
Line 
1#!/bin/bash
2#
3# @Author: Anne Philipp
4#
5# @Date: September, 10 2018
6#
7# @Description:
8#    This file defines the flex_extract's available installation
9#    parameters and puts them together for the call of the actual
10#    python installation script. It also does some checks to
11#    guarantee necessary parameters were set.
12#
13# @History:
14#    Leopold Haimberger; Aug 2020
15#       added new parameter for a system installation
16#       (seperate executable and user directories)
17#    Anne Tipka; July 2022
18#       Adapted to use on Bologna servers
19#
20# @Licence:
21#    (C) Copyright 2014-2020.
22#
23#    SPDX-License-Identifier: CC-BY-4.0
24#
25#    This work is licensed under the Creative Commons Attribution 4.0
26#    International License. To view a copy of this license, visit
27#    http://creativecommons.org/licenses/by/4.0/ or send a letter to
28#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
29#
30# -----------------------------------------------------------------
31# AVAILABLE COMMANDLINE ARGUMENTS TO SET
32#
33# THE USER HAS TO SPECIFY THESE PARAMETERS
34#
35TARGET='local'
36MAKEFILE='makefile_local_gfortran'
37ECUID='<username>'
38ECGID='<groupID>'
39GATEWAY='<gatewayname>'
40DESTINATION='<username>@genericSftp'
41INSTALLDIR=None
42SYSINSTALLDIR=None
43JOB_TEMPLATE=''
44CONTROLFILE='CONTROL_EA5'
45# -----------------------------------------------------------------
46#
47# AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!
48#
49# -----------------------------------------------------------------
50
51# PATH TO INSTALLATION SCRIPT
52script="Source/Python/install.py"
53
54# INITIALIZE EMPTY PARAMETERLIST
55parameterlist=""
56
57# CHECK IF ON ECMWF SERVER; 0
58if [[ $EC_CLUSTER == "ecs" ]] || [[ $EC_CLUSTER == "aa"* ]] || [[ $EC_CLUSTER == "ac"* ]] || [[ $EC_CLUSTER == "ad"* ]] || [[ $EC_CLUSTER == "ab"* ]]; then
59# LOAD PYTHON3 AND ECACCESS MODULES
60  module load python3 ecaccess
61fi 
62
63# DEFAULT PARAMETERLIST
64if [ -n "$TARGET" ]; then
65  parameterlist=" --target=$TARGET"
66else
67  echo "ERROR: No installation target specified."
68  echo "EXIT WITH ERROR"
69  exit
70fi
71
72# CHECK FOR MORE PARAMETER
73if [ "$TARGET" == "ecs" ] || [ "$TARGET" == "hpc" ]; then
74  # check if necessary Parameters are set
75  if [ -z "$ECUID" ] || [ -z "$ECGID" ] || [ -z "$GATEWAY" ] || [ -z "$DESTINATION" ]; then
76    echo "ERROR: At least one of the following parameters are not set: ECUID, ECGID, GATEWAY, DESTINATION!"
77    echo "EXIT WITH ERROR"
78    exit
79  else
80    parameterlist+=" --ecuid=$ECUID --ecgid=$ECGID --gateway=$GATEWAY --destination=$DESTINATION"
81  fi
82fi
83if [ -n "$MAKEFILE" ]; then
84  parameterlist+=" --makefile=$MAKEFILE"
85fi
86if [ -n "$INSTALLDIR" ]; then 
87  parameterlist+=" --installdir=$INSTALLDIR"
88fi
89if [ -n "$SYSINSTALLDIR" ]; then 
90  parameterlist+=" --sysinstalldir=$SYSINSTALLDIR"
91fi
92if [ -n "$JOB_TEMPLATE" ]; then
93  parameterlist+=" --job_template=$JOB_TEMPLATE"
94fi
95if [ -n "$CONTROLFILE" ]; then
96  parameterlist+=" --controlfile=$CONTROLFILE"
97fi
98
99# -----------------------------------------------------------------
100# CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS
101
102$script $parameterlist
103
104
105
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG