diff --git a/EESSI-pilot-install-software.sh b/EESSI-pilot-install-software.sh index 0c832fdee9..72a047836d 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 @@ -52,7 +97,7 @@ export EESSI_SOFTWARE_SUBDIR_OVERRIDE=$(python3 $TOPDIR/eessi_software_subdir.py # Set all the EESSI environment variables (respecting $EESSI_SOFTWARE_SUBDIR_OVERRIDE) # $EESSI_SILENT - don't print any messages # $EESSI_BASIC_ENV - give a basic set of environment variables -EESSI_SILENT=1 EESSI_BASIC_ENV=1 source $TOPDIR/init/eessi_environment_variables +EESSI_SILENT=0 EESSI_BASIC_ENV=1 source $TOPDIR/init/eessi_environment_variables if [[ -z ${EESSI_SOFTWARE_SUBDIR} ]]; then fatal_error "Failed to determine software subdirectory?!" @@ -88,10 +133,12 @@ else fi REQ_EB_VERSION='4.5.0' +#REQ_EB_VERSION='4.6.1' echo ">> Checking for EasyBuild module..." ml_av_easybuild_out=$TMPDIR/ml_av_easybuild.out module avail 2>&1 | grep -i easybuild/${REQ_EB_VERSION} &> ${ml_av_easybuild_out} + if [[ $? -eq 0 ]]; then echo_green ">> EasyBuild module found!" else @@ -102,12 +149,24 @@ else pip_install_out=${TMPDIR}/pip_install.out pip3 install --prefix $EB_TMPDIR easybuild &> ${pip_install_out} + echo "pip_install_out" + cat ${pip_install_out} + echo ">> Final installation in ${EASYBUILD_INSTALLPATH}..." export PATH=${EB_TMPDIR}/bin:$PATH export PYTHONPATH=$(ls -d ${EB_TMPDIR}/lib/python*/site-packages):$PYTHONPATH + echo "which eb = '$(which eb)'" + eb --show-config + eb_install_out=${TMPDIR}/eb_install.out eb --install-latest-eb-release &> ${eb_install_out} +# eb EasyBuild-${REQ_EB_VERSION}.eb >> ${eb_install_out} 2>&1 + + echo "eb_install_out" + cat ${eb_install_out} + echo "eb --search EasyBuild-${REQ_EB_VERSION}.eb..." + eb --search EasyBuild-${REQ_EB_VERSION}.eb eb --search EasyBuild-${REQ_EB_VERSION}.eb | grep EasyBuild-${REQ_EB_VERSION}.eb > /dev/null if [[ $? -eq 0 ]]; then eb EasyBuild-${REQ_EB_VERSION}.eb >> ${eb_install_out} 2>&1 @@ -117,12 +176,15 @@ else if [[ $? -eq 0 ]]; then echo_green ">> EasyBuild module installed!" else - fatal_error "EasyBuild/${REQ_EB_VERSION} module failed to install?! (output of 'pip install' in ${pip_install_out}, output of 'eb' in ${eb_install_out}, output of 'ml av easybuild' in ${ml_av_easybuild_out})" + fatal_error "EasyBuild/${REQ_EB_VERSION} module failed to install?! (output of 'pip install' in ${pip_install_out} --$(cat ${pip_install_out})--, output of 'eb' in ${eb_install_out} --$(cat ${eb_install_out})--, output of 'ml av easybuild' in ${ml_av_easybuild_out}) --$(cat ${ml_av_easybuild_out})--" fi fi +ls -l $MODULEPATH + echo ">> Loading EasyBuild module..." module load EasyBuild/$REQ_EB_VERSION +#module --ignore_cache load EasyBuild/$REQ_EB_VERSION eb_show_system_info_out=${TMPDIR}/eb_show_system_info.out $EB --show-system-info > ${eb_show_system_info_out} if [[ $? -eq 0 ]]; then @@ -150,6 +212,14 @@ fail_msg="Failed to install Java, woopsie..." $EB Java-11.eb --robot --include-easyblocks-from-pr 2557 check_exit_code $? "${ok_msg}" "${fail_msg}" +# install Java with fixed custom easyblock that uses patchelf to ensure right glibc is picked up, +# see https://github.com/EESSI/software-layer/issues/123 +# and https://github.com/easybuilders/easybuild-easyblocks/pull/2557 +#ok_msg="Java 11.0.16 installed, off to a good (?) start!" +#fail_msg="Failed to install Java 11.0.16, woopsie..." +#$EB Java-11.0.16.eb --robot --include-easyblocks-from-pr 2557 +#check_exit_code $? "${ok_msg}" "${fail_msg}" + # install GCC for foss/2020a export GCC_EC="GCC-9.3.0.eb" echo ">> Starting slow with ${GCC_EC}..." @@ -305,6 +375,15 @@ 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 +export CaDiCaL_EC="CaDiCaL-1.3.0-GCC-9.3.0.eb" +echo ">> Installing ${CaDiCaL_EC}..." +ok_msg="${CaDiCaL_EC} installed, let's solve some problems!" +fail_msg="Installation of ${CaDiCaL_EC} failed, that's a pity..." +$EB ${CaDiCaL_EC} --robot +check_exit_code $? "${ok_msg}" "${fail_msg}" + + 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/eessi-2021.12.yml b/eessi-2021.12.yml index f3ed9dd9c4..6b1410d1fc 100644 --- a/eessi-2021.12.yml +++ b/eessi-2021.12.yml @@ -53,3 +53,7 @@ software: versions: '3.9.1.1': versionsuffix: -dmpar + CaDiCaL: + toolchains: + GCC-9.3.0: + versions: '1.3.0' 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 "$@"