Skip to content

Commit

Permalink
update init scripts for software.eessi.io (+ drop 'pilot' terminology)
Browse files Browse the repository at this point in the history
  • Loading branch information
boegel committed Nov 24, 2023
1 parent 77c8845 commit d451d06
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions init/Magic_Castle/bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ EESSI_SILENT=1
source $(dirname "$BASH_SOURCE")/../eessi_environment_variables

# Don't change the default prompt
# export PS1="[EESSI pilot $EESSI_PILOT_VERSION] $ "
# export PS1="[EESSI $EESSI_VERSION] $ "

# Provide a clean MODULEPATH
export MODULEPATH_ROOT=$EESSI_MODULEPATH
Expand Down Expand Up @@ -36,4 +36,4 @@ else
module reload
fi

echo "Environment set up to use EESSI pilot software stack (${EESSI_PILOT_VERSION}), have fun!"
echo "Environment set up to use EESSI (${EESSI_VERSION}), have fun!"
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export EESSI_SILENT=1
# for MacOS due to the use of `readlink`)
source $(dirname "$(readlink -f "$BASH_SOURCE")")/../eessi_environment_variables

eessi_pilot_python=$(ls ${EESSI_SOFTWARE_PATH}/software/Python/3*GCCcore*/bin/python | sed 1q)
if [ -f "$eessi_pilot_python" ]; then
$eessi_pilot_python "$@"
eessi_python=$(ls ${EESSI_SOFTWARE_PATH}/software/Python/3*GCCcore*/bin/python | sed 1q)
if [ -f "$eessi_python" ]; then
$eessi_python "$@"
else
echo "ERROR: No EESSI pilot python 3 available."
echo "ERROR: No EESSI Python 3 available."
false
fi
6 changes: 3 additions & 3 deletions init/bash
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ source $(dirname "$BASH_SOURCE")/eessi_environment_variables
# only continue if setting EESSI environment variables worked fine
if [ $? -eq 0 ]; then

export PS1="[EESSI pilot $EESSI_PILOT_VERSION] $ "
export PS1="[EESSI $EESSI_VERSION] $ "

# add location of commands provided by compat layer to $PATH;
# see https://github.com/EESSI/software-layer/issues/52
Expand All @@ -28,12 +28,12 @@ if [ $? -eq 0 ]; then
module use $EESSI_MODULEPATH

#echo >> $output
#echo "*** Known problems in the ${EESSI_PILOT_VERSION} pilot software stack ***" >> $output
#echo "*** Known problems in the ${EESSI_VERSION} software stack ***" >> $output
#echo >> $output
#echo "1) ..." >> $output
#echo >> $output
#echo >> $output

echo "Environment set up to use EESSI pilot software stack, have fun!" >> $output
echo "Environment set up to use EESSI (${EESSI_VERSION}), have fun!"

fi
7 changes: 5 additions & 2 deletions init/eessi_defaults
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
# license: GPLv2
#

export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/pilot.eessi-hpc.org}"
export EESSI_PILOT_VERSION="${EESSI_PILOT_VERSION_OVERRIDE:=2023.06}"
export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/software.eessi.io}"
export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=2023.06}"
# use archdetect by default, unless otherwise specified
export EESSI_USE_ARCHDETECT="${EESSI_USE_ARCHDETECT:=1}"
export EESSI_USE_ARCHSPEC="${EESSI_USE_ARCHSPEC:=0}"
10 changes: 6 additions & 4 deletions init/eessi_environment_variables
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ function error() {
false
}

# set up minimal environment: $EESSI_PREFIX, $EESSI_PILOT_VERSION, $EESSI_OS_TYPE, $EESSI_CPU_FAMILY, $EPREFIX
# set up minimal environment: $EESSI_PREFIX, $EESSI_VERSION, $EESSI_OS_TYPE, $EESSI_CPU_FAMILY, $EPREFIX
source $EESSI_INIT_DIR_PATH/minimal_eessi_env

if [ -d $EESSI_PREFIX ]; then
echo "Found EESSI pilot repo @ $EESSI_PREFIX!" >> $output
echo "Found EESSI repo @ $EESSI_PREFIX!" >> $output

export EESSI_EPREFIX=$EPREFIX
if [ -d $EESSI_EPREFIX ]; then
Expand All @@ -29,11 +29,13 @@ if [ -d $EESSI_PREFIX ]; then
# if archdetect is enabled, use internal code
export EESSI_SOFTWARE_SUBDIR=$(${EESSI_INIT_DIR_PATH}/eessi_archdetect.sh cpupath)
echo "archdetect says ${EESSI_SOFTWARE_SUBDIR}" >> $output
else
elif [ "$EESSI_USE_ARCHSPEC" == "1" ]; then
# note: eessi_software_subdir_for_host.py will pick up value from $EESSI_SOFTWARE_SUBDIR_OVERRIDE if it's defined!
export EESSI_EPREFIX_PYTHON=$EESSI_EPREFIX/usr/bin/python3
export EESSI_SOFTWARE_SUBDIR=$($EESSI_EPREFIX_PYTHON ${EESSI_INIT_DIR_PATH}/eessi_software_subdir_for_host.py $EESSI_PREFIX)
echo "archspec says ${EESSI_SOFTWARE_SUBDIR}" >> $output
else
error "Don't know how to detect host CPU, giving up!"
fi
if [ ! -z $EESSI_SOFTWARE_SUBDIR ]; then

Expand Down Expand Up @@ -82,5 +84,5 @@ if [ -d $EESSI_PREFIX ]; then
error "Compatibility layer directory $EESSI_EPREFIX not found!"
fi
else
error "EESSI pilot repository at $EESSI_PREFIX not found!"
error "EESSI repository at $EESSI_PREFIX not found!"
fi
4 changes: 2 additions & 2 deletions init/minimal_eessi_env
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
# $BASH_SOURCE points to correct path, see also http://mywiki.wooledge.org/BashFAQ/028
EESSI_INIT_DIR_PATH=$(dirname $(realpath $BASH_SOURCE))

# set up defaults: EESSI_CVMFS_REPO, EESSI_PILOT_VERSION
# set up defaults: EESSI_CVMFS_REPO, EESSI_VERSION
# script takes *_OVERRIDEs into account
source ${EESSI_INIT_DIR_PATH}/eessi_defaults

export EESSI_PREFIX=$EESSI_CVMFS_REPO/versions/$EESSI_PILOT_VERSION
export EESSI_PREFIX=$EESSI_CVMFS_REPO/versions/$EESSI_VERSION

if [[ $(uname -s) == 'Linux' ]]; then
export EESSI_OS_TYPE='linux'
Expand Down

0 comments on commit d451d06

Please sign in to comment.