forked from EESSI/software-layer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash
57 lines (48 loc) · 2.14 KB
/
bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
export EESSI_PILOT_VERSION="2020.09"
export PS1="[EESSI pilot $EESSI_PILOT_VERSION] $ "
export EESSI_PREFIX=/cvmfs/pilot.eessi-hpc.org/$EESSI_PILOT_VERSION
if [ -d $EESSI_PREFIX ]; then
echo "Found EESSI pilot repo @ $EESSI_PREFIX!"
export EPREFIX=$EESSI_PREFIX/compat/$(uname -m)
if [ -d $EPREFIX ]; then
# determine subdirectory in software layer
# note: eessi_software_subdir_for_host.py will pick up value from $EESSI_SOFTWARE_SUBDIR_OVERRIDE if it's defined!
EESSI_PYTHON=$EPREFIX/usr/bin/python3
export EESSI_SOFTWARE_SUBDIR=$($EESSI_PYTHON ${EESSI_PREFIX}/init/eessi_software_subdir_for_host.py $EESSI_PREFIX)
if [ ! -z $EESSI_SOFTWARE_SUBDIR ]; then
echo "Using ${EESSI_SOFTWARE_SUBDIR} as software subdirectory."
export EESSI_SOFTWARE_PATH=$EESSI_PREFIX/software/$EESSI_SOFTWARE_SUBDIR
if [ -d $EESSI_SOFTWARE_PATH ]; then
# init Lmod
echo "Initializing Lmod..."
source $EPREFIX/usr/lmod/*/init/bash
# prepend location of modules for EESSI software stack to $MODULEPATH
export EESSI_MODULEPATH=$EESSI_SOFTWARE_PATH/modules/all
echo "Prepending $EESSI_MODULEPATH to \$MODULEPATH..."
module use $EESSI_MODULEPATH
echo
echo "*** Known problems in the ${EESSI_PILOT_VERSION} pilot software stack ***"
echo
echo "1) No Lmod cache has been generated yet for the module files included"
echo " in the ${EESSI_PILOT_VERSION} pilot software stack."
echo " As a result, 'module' commands may be somewhat slow."
echo " (see also https://github.com/EESSI/software-layer/issues/10)"
echo
echo
echo "Environment set up to use EESSI pilot software stack, have fun!"
else
echo "ERROR: EESSI software layer at $EESSI_SOFTWARE_PATH not found!" >&2
false
fi
else
echo "ERROR: no value set for \$EESSI_SOFTWARE_SUBDIR" >*&2
false
fi
else
echo "ERROR: Compatibility layer directory %s not found!" >&2
false
fi
else
echo "ERROR: EESSI pilot repository at $EESSI_PREFIX not found!" >&2
false
fi