diff --git a/EESSI-pilot-install-software.sh b/EESSI-pilot-install-software.sh index 0c832fdee9..7312818a2c 100755 --- a/EESSI-pilot-install-software.sh +++ b/EESSI-pilot-install-software.sh @@ -1,7 +1,52 @@ #!/bin/bash # # Script to install EESSI pilot software stack (version 2021.12) -# + +# see example parsing of command line arguments at +# https://wiki.bash-hackers.org/scripting/posparams#using_a_while_loop +# https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash + +display_help() { + echo "usage: $0 [OPTIONS]" + echo " -g | --generic - instructs script to build for generic architecture target" + echo " -h | --help - display this usage information" + echo " -x | --http-proxy URL - provides URL for the environment variable http_proxy" + echo " -y | --https-proxy URL - provides URL for the environment variable https_proxy" +} + +POSITIONAL_ARGS=() + +while [[ $# -gt 0 ]]; do + case $1 in + -g|--generic) + EASYBUILD_OPTARCH="GENERIC" + shift + ;; + -h|--help) + display_help # Call your function + # no shifting needed here, we're done. + exit 0 + ;; + -x|--http-proxy) + export http_proxy="$2" + shift 2 + ;; + -y|--https-proxy) + export https_proxy="$2" + shift 2 + ;; + -*|--*) + echo "Error: Unknown option: $1" >&2 + exit 1 + ;; + *) # No more options + POSITIONAL_ARGS+=("$1") # save positional arg + shift + ;; + esac +done + +set -- "${POSITIONAL_ARGS[@]}" TOPDIR=$(dirname $(realpath $0)) @@ -39,7 +84,7 @@ export PYTHONPYCACHEPREFIX=$TMPDIR/pycache DETECTION_PARAMETERS='' GENERIC=0 EB='eb' -if [[ "$1" == "--generic" || "$EASYBUILD_OPTARCH" == "GENERIC" ]]; then +if [[ "$EASYBUILD_OPTARCH" == "GENERIC" ]]; then echo_yellow ">> GENERIC build requested, taking appropriate measures!" DETECTION_PARAMETERS="$DETECTION_PARAMETERS --generic" GENERIC=1 @@ -305,6 +350,8 @@ fail_msg="Installation of WRF failed, that's unexpected..." OMPI_MCA_pml=ucx UCX_TLS=tcp $EB WRF-3.9.1.1-foss-2020a-dmpar.eb -r --include-easyblocks-from-pr 2648 check_exit_code $? "${ok_msg}" "${fail_msg}" +### add packages here + echo ">> Creating/updating Lmod cache..." export LMOD_RC="${EASYBUILD_INSTALLPATH}/.lmod/lmodrc.lua" if [ ! -f $LMOD_RC ]; then diff --git a/README.md b/README.md index 508763c090..4d463b1c5b 100644 --- a/README.md +++ b/README.md @@ -6,21 +6,17 @@ See also https://eessi.github.io/docs/software_layer. ## Pilot software stack -A script that sets up your environment to start using the 2020.08 version of the EESSI pilot software stack -is available at `EESSI-pilot-2020.08_init.sh`. - -This script should be copied to `/cvmfs/pilot.eessi-hpc.org/2020.08/init/bash` if it is not available there already, -and sourced to set up your environment: +You can set up your environment by sourcing the init script: ``` -$ source /cvmfs/pilot.eessi-hpc.org/2020.08/init/bash -Found EESSI pilot repo @ /cvmfs/pilot.eessi-hpc.org/2020.08! +$ source /cvmfs/pilot.eessi-hpc.org/versions/2021.12/init/bash +Found EESSI pilot repo @ /cvmfs/pilot.eessi-hpc.org/versions/2021.12! Derived subdirectory for software layer: x86_64/intel/haswell Using x86_64/intel/haswell subdirectory for software layer (HARDCODED) Initializing Lmod... -Prepending /cvmfs/pilot.eessi-hpc.org/2020.08/software/x86_64/intel/haswell/modules/all to $MODULEPATH... +Prepending /cvmfs/pilot.eessi-hpc.org/versions/2021.12/software/x86_64/intel/haswell/modules/all to $MODULEPATH... Environment set up to use EESSI pilot software stack, have fun! -[EESSI pilot 2020.08] $ +[EESSI pilot 2021.12] $ ``` # License diff --git a/build_container.sh b/build_container.sh index e9fe593d92..1fffde9c75 100755 --- a/build_container.sh +++ b/build_container.sh @@ -26,7 +26,7 @@ if [ $? -eq 0 ]; then attr -s test -V test $testfile > /dev/null if [ $? -ne 0 ]; then echo "ERROR: $EESSI_TMPDIR does not support extended attributes!" >&2 - exit 2 + #exit 2 else rm $testfile fi diff --git a/install_software_layer.sh b/install_software_layer.sh index b045d75f90..e0b2f785d5 100755 --- a/install_software_layer.sh +++ b/install_software_layer.sh @@ -1,3 +1,3 @@ #!/bin/bash export EESSI_PILOT_VERSION='2021.12' -./run_in_compat_layer_env.sh ./EESSI-pilot-install-software.sh +./run_in_compat_layer_env.sh ./EESSI-pilot-install-software.sh "$@"