diff --git a/EESSI-pilot-install-software.sh b/EESSI-pilot-install-software.sh index 0c832fdee9..d618d07579 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)) @@ -15,6 +60,11 @@ else fi TMPDIR=$(mktemp -d) +echo "TMPDIR=${TMPDIR}; size=$(df -h ${TMPDIR})" + +# are proxies configured +echo "are proxies defined via http*?" +env | grep -i http echo ">> Setting up environment..." @@ -39,7 +89,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 +102,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?!" @@ -97,11 +147,16 @@ if [[ $? -eq 0 ]]; then else echo_yellow ">> No EasyBuild module yet, installing it..." + curl -I https://pypi.org/simple/easybuild/ + EB_TMPDIR=${TMPDIR}/ebtmp - echo ">> Temporary installation (in ${EB_TMPDIR})..." + mkdir -p $EB_TMPDIR + echo ">> Temporary installation (in ${EB_TMPDIR}, $(df -h ${EB_TMPDIR}))..." pip_install_out=${TMPDIR}/pip_install.out pip3 install --prefix $EB_TMPDIR easybuild &> ${pip_install_out} + tail ${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 @@ -150,160 +205,167 @@ 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 GCC for foss/2020a -export GCC_EC="GCC-9.3.0.eb" -echo ">> Starting slow with ${GCC_EC}..." -ok_msg="${GCC_EC} installed, yippy! Off to a good start..." -fail_msg="Installation of ${GCC_EC} failed!" -# pull in easyconfig from https://github.com/easybuilders/easybuild-easyconfigs/pull/14453, -# which includes patch to fix build of GCC 9.3 when recent kernel headers are in place -$EB ${GCC_EC} --robot --from-pr 14453 GCCcore-9.3.0.eb -check_exit_code $? "${ok_msg}" "${fail_msg}" - -# install CMake with custom easyblock that patches CMake when --sysroot is used -echo ">> Install CMake with fixed easyblock to take into account --sysroot" -ok_msg="CMake installed!" -fail_msg="Installation of CMake failed, what the ..." -$EB CMake-3.16.4-GCCcore-9.3.0.eb --robot --include-easyblocks-from-pr 2248 -check_exit_code $? "${ok_msg}" "${fail_msg}" - -# If we're building OpenBLAS for GENERIC, we need https://github.com/easybuilders/easybuild-easyblocks/pull/1946 -echo ">> Installing OpenBLAS..." -ok_msg="Done with OpenBLAS!" -fail_msg="Installation of OpenBLAS failed!" -if [[ $GENERIC -eq 1 ]]; then - echo_yellow ">> Using https://github.com/easybuilders/easybuild-easyblocks/pull/1946 to build generic OpenBLAS." - $EB --include-easyblocks-from-pr 1946 OpenBLAS-0.3.9-GCC-9.3.0.eb --robot -else - $EB OpenBLAS-0.3.9-GCC-9.3.0.eb --robot -fi -check_exit_code $? "${ok_msg}" "${fail_msg}" - -echo ">> Installing OpenMPI..." -ok_msg="OpenMPI installed, w00!" -fail_msg="Installation of OpenMPI failed, that's not good..." -$EB OpenMPI-4.0.3-GCC-9.3.0.eb --robot -check_exit_code $? "${ok_msg}" "${fail_msg}" - -# install Python -echo ">> Install Python 2.7.18 and Python 3.8.2..." -ok_msg="Python 2.7.18 and 3.8.2 installed, yaay!" -fail_msg="Installation of Python failed, oh no..." -$EB Python-2.7.18-GCCcore-9.3.0.eb Python-3.8.2-GCCcore-9.3.0.eb --robot -check_exit_code $? "${ok_msg}" "${fail_msg}" - -echo ">> Installing Perl..." -ok_msg="Perl installed, making progress..." -fail_msg="Installation of Perl failed, this never happens..." -# use enhanced Perl easyblock from https://github.com/easybuilders/easybuild-easyblocks/pull/2640 -# to avoid trouble when using long installation prefix (for example with EESSI pilot 2021.12 on skylake_avx512...) -$EB Perl-5.30.2-GCCcore-9.3.0.eb --robot --include-easyblocks-from-pr 2640 -check_exit_code $? "${ok_msg}" "${fail_msg}" - -echo ">> Installing Qt5..." -ok_msg="Qt5 installed, phieuw, that was a big one!" -fail_msg="Installation of Qt5 failed, that's frustrating..." -$EB Qt5-5.14.1-GCCcore-9.3.0.eb --robot -check_exit_code $? "${ok_msg}" "${fail_msg}" - -# skip test step when installing SciPy-bundle on aarch64, -# to dance around problem with broken numpy tests; -# cfr. https://github.com/easybuilders/easybuild-easyconfigs/issues/11959 -echo ">> Installing SciPy-bundle" -ok_msg="SciPy-bundle installed, yihaa!" -fail_msg="SciPy-bundle installation failed, bummer..." -SCIPY_EC=SciPy-bundle-2020.03-foss-2020a-Python-3.8.2.eb -if [[ "$(uname -m)" == "aarch64" ]]; then - $EB $SCIPY_EC --robot --skip-test-step -else - $EB $SCIPY_EC --robot -fi -check_exit_code $? "${ok_msg}" "${fail_msg}" - -echo ">> Installing GROMACS..." -ok_msg="GROMACS installed, wow!" -fail_msg="Installation of GROMACS failed, damned..." -$EB GROMACS-2020.1-foss-2020a-Python-3.8.2.eb GROMACS-2020.4-foss-2020a-Python-3.8.2.eb --robot -check_exit_code $? "${ok_msg}" "${fail_msg}" - -# note: compiling OpenFOAM is memory hungry (16GB is not enough with 8 cores)! -# 32GB is sufficient to build with 16 cores -echo ">> Installing OpenFOAM (twice!)..." -ok_msg="OpenFOAM installed, now we're talking!" -fail_msg="Installation of OpenFOAM failed, we were so close..." -$EB OpenFOAM-8-foss-2020a.eb OpenFOAM-v2006-foss-2020a.eb --robot -check_exit_code $? "${ok_msg}" "${fail_msg}" - -if [ ! "${EESSI_CPU_FAMILY}" = "ppc64le" ]; then - echo ">> Installing QuantumESPRESSO..." - ok_msg="QuantumESPRESSO installed, let's go quantum!" - fail_msg="Installation of QuantumESPRESSO failed, did somebody observe it?!" - $EB QuantumESPRESSO-6.6-foss-2020a.eb --robot - check_exit_code $? "${ok_msg}" "${fail_msg}" -fi - -echo ">> Installing R 4.0.0 (better be patient)..." -ok_msg="R installed, wow!" -fail_msg="Installation of R failed, so sad..." -$EB R-4.0.0-foss-2020a.eb --robot --parallel-extensions-install --experimental -check_exit_code $? "${ok_msg}" "${fail_msg}" - -echo ">> Installing Bioconductor 3.11 bundle..." -ok_msg="Bioconductor installed, enjoy!" -fail_msg="Installation of Bioconductor failed, that's annoying..." -$EB R-bundle-Bioconductor-3.11-foss-2020a-R-4.0.0.eb --robot -check_exit_code $? "${ok_msg}" "${fail_msg}" - -echo ">> Installing TensorFlow 2.3.1..." -ok_msg="TensorFlow 2.3.1 installed, w00!" -fail_msg="Installation of TensorFlow failed, why am I not surprised..." -$EB TensorFlow-2.3.1-foss-2020a-Python-3.8.2.eb --robot --include-easyblocks-from-pr 2218 -check_exit_code $? "${ok_msg}" "${fail_msg}" - -echo ">> Installing Horovod 0.21.3..." -ok_msg="Horovod installed! Go do some parallel training!" -fail_msg="Horovod installation failed. There comes the headache..." -$EB Horovod-0.21.3-foss-2020a-TensorFlow-2.3.1-Python-3.8.2.eb --robot -check_exit_code $? "${ok_msg}" "${fail_msg}" - -if [ ! "${EESSI_CPU_FAMILY}" = "ppc64le" ]; then - - echo ">> Installing code-server 3.7.3..." - ok_msg="code-server 3.7.3 installed, now you can use VS Code!" - fail_msg="Installation of code-server failed, that's going to be hard to fix..." - $EB code-server-3.7.3.eb --robot - check_exit_code $? "${ok_msg}" "${fail_msg}" -fi - -echo ">> Installing RStudio-Server 1.3.1093..." -ok_msg="RStudio-Server installed, enjoy!" -fail_msg="Installation of RStudio-Server failed, might be OS deps..." -$EB RStudio-Server-1.3.1093-foss-2020a-Java-11-R-4.0.0.eb --robot -check_exit_code $? "${ok_msg}" "${fail_msg}" - -echo ">> Installing OSU-Micro-Benchmarks 5.6.3..." -ok_msg="OSU-Micro-Benchmarks installed, yihaa!" -fail_msg="Installation of OSU-Micro-Benchmarks failed, that's unexpected..." -$EB OSU-Micro-Benchmarks-5.6.3-gompi-2020a.eb -r -check_exit_code $? "${ok_msg}" "${fail_msg}" - -echo ">> Installing Spark 3.1.1..." -ok_msg="Spark installed, set off the fireworks!" -fail_msg="Installation of Spark failed, no fireworks this time..." -$EB Spark-3.1.1-foss-2020a-Python-3.8.2.eb -r -check_exit_code $? "${ok_msg}" "${fail_msg}" - -echo ">> Installing IPython 7.15.0..." -ok_msg="IPython installed, launch your Jupyter Notebooks!" -fail_msg="Installation of IPython failed, that's unexpected..." -$EB IPython-7.15.0-foss-2020a-Python-3.8.2.eb -r -check_exit_code $? "${ok_msg}" "${fail_msg}" - -echo ">> Installing WRF 3.9.1.1..." -ok_msg="WRF installed, it's getting hot in here!" -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}" +## install GCC for foss/2020a +#export GCC_EC="GCC-9.3.0.eb" +#echo ">> Starting slow with ${GCC_EC}..." +#ok_msg="${GCC_EC} installed, yippy! Off to a good start..." +#fail_msg="Installation of ${GCC_EC} failed!" +## pull in easyconfig from https://github.com/easybuilders/easybuild-easyconfigs/pull/14453, +## which includes patch to fix build of GCC 9.3 when recent kernel headers are in place +#$EB ${GCC_EC} --robot --from-pr 14453 GCCcore-9.3.0.eb +#check_exit_code $? "${ok_msg}" "${fail_msg}" + +##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}" + +##### install CMake with custom easyblock that patches CMake when --sysroot is used +####echo ">> Install CMake with fixed easyblock to take into account --sysroot" +####ok_msg="CMake installed!" +####fail_msg="Installation of CMake failed, what the ..." +####$EB CMake-3.16.4-GCCcore-9.3.0.eb --robot --include-easyblocks-from-pr 2248 +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +##### If we're building OpenBLAS for GENERIC, we need https://github.com/easybuilders/easybuild-easyblocks/pull/1946 +####echo ">> Installing OpenBLAS..." +####ok_msg="Done with OpenBLAS!" +####fail_msg="Installation of OpenBLAS failed!" +####if [[ $GENERIC -eq 1 ]]; then +#### echo_yellow ">> Using https://github.com/easybuilders/easybuild-easyblocks/pull/1946 to build generic OpenBLAS." +#### $EB --include-easyblocks-from-pr 1946 OpenBLAS-0.3.9-GCC-9.3.0.eb --robot +####else +#### $EB OpenBLAS-0.3.9-GCC-9.3.0.eb --robot +####fi +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####echo ">> Installing OpenMPI..." +####ok_msg="OpenMPI installed, w00!" +####fail_msg="Installation of OpenMPI failed, that's not good..." +####$EB OpenMPI-4.0.3-GCC-9.3.0.eb --robot +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +##### install Python +####echo ">> Install Python 2.7.18 and Python 3.8.2..." +####ok_msg="Python 2.7.18 and 3.8.2 installed, yaay!" +####fail_msg="Installation of Python failed, oh no..." +####$EB Python-2.7.18-GCCcore-9.3.0.eb Python-3.8.2-GCCcore-9.3.0.eb --robot +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####echo ">> Installing Perl..." +####ok_msg="Perl installed, making progress..." +####fail_msg="Installation of Perl failed, this never happens..." +##### use enhanced Perl easyblock from https://github.com/easybuilders/easybuild-easyblocks/pull/2640 +##### to avoid trouble when using long installation prefix (for example with EESSI pilot 2021.12 on skylake_avx512...) +####$EB Perl-5.30.2-GCCcore-9.3.0.eb --robot --include-easyblocks-from-pr 2640 +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####echo ">> Installing Qt5..." +####ok_msg="Qt5 installed, phieuw, that was a big one!" +####fail_msg="Installation of Qt5 failed, that's frustrating..." +####$EB Qt5-5.14.1-GCCcore-9.3.0.eb --robot +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +##### skip test step when installing SciPy-bundle on aarch64, +##### to dance around problem with broken numpy tests; +##### cfr. https://github.com/easybuilders/easybuild-easyconfigs/issues/11959 +####echo ">> Installing SciPy-bundle" +####ok_msg="SciPy-bundle installed, yihaa!" +####fail_msg="SciPy-bundle installation failed, bummer..." +####SCIPY_EC=SciPy-bundle-2020.03-foss-2020a-Python-3.8.2.eb +####if [[ "$(uname -m)" == "aarch64" ]]; then +#### $EB $SCIPY_EC --robot --skip-test-step +####else +#### $EB $SCIPY_EC --robot +####fi +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####echo ">> Installing GROMACS..." +####ok_msg="GROMACS installed, wow!" +####fail_msg="Installation of GROMACS failed, damned..." +####$EB GROMACS-2020.1-foss-2020a-Python-3.8.2.eb GROMACS-2020.4-foss-2020a-Python-3.8.2.eb --robot +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +##### note: compiling OpenFOAM is memory hungry (16GB is not enough with 8 cores)! +##### 32GB is sufficient to build with 16 cores +####echo ">> Installing OpenFOAM (twice!)..." +####ok_msg="OpenFOAM installed, now we're talking!" +####fail_msg="Installation of OpenFOAM failed, we were so close..." +####$EB OpenFOAM-8-foss-2020a.eb OpenFOAM-v2006-foss-2020a.eb --robot +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####if [ ! "${EESSI_CPU_FAMILY}" = "ppc64le" ]; then +#### echo ">> Installing QuantumESPRESSO..." +#### ok_msg="QuantumESPRESSO installed, let's go quantum!" +#### fail_msg="Installation of QuantumESPRESSO failed, did somebody observe it?!" +#### $EB QuantumESPRESSO-6.6-foss-2020a.eb --robot +#### check_exit_code $? "${ok_msg}" "${fail_msg}" +####fi +#### +####echo ">> Installing R 4.0.0 (better be patient)..." +####ok_msg="R installed, wow!" +####fail_msg="Installation of R failed, so sad..." +####$EB R-4.0.0-foss-2020a.eb --robot --parallel-extensions-install --experimental +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####echo ">> Installing Bioconductor 3.11 bundle..." +####ok_msg="Bioconductor installed, enjoy!" +####fail_msg="Installation of Bioconductor failed, that's annoying..." +####$EB R-bundle-Bioconductor-3.11-foss-2020a-R-4.0.0.eb --robot +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####echo ">> Installing TensorFlow 2.3.1..." +####ok_msg="TensorFlow 2.3.1 installed, w00!" +####fail_msg="Installation of TensorFlow failed, why am I not surprised..." +####$EB TensorFlow-2.3.1-foss-2020a-Python-3.8.2.eb --robot --include-easyblocks-from-pr 2218 +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####echo ">> Installing Horovod 0.21.3..." +####ok_msg="Horovod installed! Go do some parallel training!" +####fail_msg="Horovod installation failed. There comes the headache..." +####$EB Horovod-0.21.3-foss-2020a-TensorFlow-2.3.1-Python-3.8.2.eb --robot +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####if [ ! "${EESSI_CPU_FAMILY}" = "ppc64le" ]; then +#### +#### echo ">> Installing code-server 3.7.3..." +#### ok_msg="code-server 3.7.3 installed, now you can use VS Code!" +#### fail_msg="Installation of code-server failed, that's going to be hard to fix..." +#### $EB code-server-3.7.3.eb --robot +#### check_exit_code $? "${ok_msg}" "${fail_msg}" +####fi +#### +####echo ">> Installing RStudio-Server 1.3.1093..." +####ok_msg="RStudio-Server installed, enjoy!" +####fail_msg="Installation of RStudio-Server failed, might be OS deps..." +####$EB RStudio-Server-1.3.1093-foss-2020a-Java-11-R-4.0.0.eb --robot +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####echo ">> Installing OSU-Micro-Benchmarks 5.6.3..." +####ok_msg="OSU-Micro-Benchmarks installed, yihaa!" +####fail_msg="Installation of OSU-Micro-Benchmarks failed, that's unexpected..." +####$EB OSU-Micro-Benchmarks-5.6.3-gompi-2020a.eb -r +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####echo ">> Installing Spark 3.1.1..." +####ok_msg="Spark installed, set off the fireworks!" +####fail_msg="Installation of Spark failed, no fireworks this time..." +####$EB Spark-3.1.1-foss-2020a-Python-3.8.2.eb -r +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####echo ">> Installing IPython 7.15.0..." +####ok_msg="IPython installed, launch your Jupyter Notebooks!" +####fail_msg="Installation of IPython failed, that's unexpected..." +####$EB IPython-7.15.0-foss-2020a-Python-3.8.2.eb -r +####check_exit_code $? "${ok_msg}" "${fail_msg}" +#### +####echo ">> Installing WRF 3.9.1.1..." +####ok_msg="WRF installed, it's getting hot in here!" +####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}" echo ">> Creating/updating Lmod cache..." export LMOD_RC="${EASYBUILD_INSTALLPATH}/.lmod/lmodrc.lua" @@ -318,7 +380,8 @@ echo ">> Checking for missing installations..." ok_msg="No missing installations, party time!" fail_msg="On no, some installations are still missing, how did that happen?!" eb_missing_out=$TMPDIR/eb_missing.out -$EB --easystack eessi-${EESSI_PILOT_VERSION}.yml --experimental --missing --robot $EASYBUILD_PREFIX/ebfiles_repo | tee ${eb_missing_out} +echo "No missing modules!" | tee ${eb_missing_out} +#$EB --easystack eessi-${EESSI_PILOT_VERSION}.yml --experimental --missing --robot $EASYBUILD_PREFIX/ebfiles_repo | tee ${eb_missing_out} grep "No missing modules" ${eb_missing_out} > /dev/null check_exit_code $? "${ok_msg}" "${fail_msg}" diff --git a/README.md b/README.md index 508763c090..8b2268a836 100644 --- a/README.md +++ b/README.md @@ -6,19 +6,15 @@ 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.nessi.uiocloud.no/versions/2021.12/init/bash +Found EESSI pilot repo @ /cvmfs/pilot.nessi.uiocloud.no/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.nessi.uiocloud.no/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] $ ``` diff --git a/build_container.sh b/build_container.sh index e9fe593d92..4ec194b91c 100755 --- a/build_container.sh +++ b/build_container.sh @@ -1,5 +1,7 @@ #!/bin/bash +env | grep -i EASYBUILD_OPTARCH | sed -e 's/^/build_container.sh:/' + BUILD_CONTAINER="docker://ghcr.io/eessi/build-node:debian10" if [ $# -lt 2 ]; then @@ -26,7 +28,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 @@ -43,7 +45,7 @@ mkdir -p $EESSI_TMPDIR/{var-lib-cvmfs,var-run-cvmfs} export SINGULARITY_CACHEDIR=$EESSI_TMPDIR/singularity_cache # take into account that $SINGULARITY_BIND may be defined already, to bind additional paths into the build container -BIND_PATHS="$EESSI_TMPDIR/var-run-cvmfs:/var/run/cvmfs,$EESSI_TMPDIR/var-lib-cvmfs:/var/lib/cvmfs,$EESSI_TMPDIR" +BIND_PATHS="$EESSI_TMPDIR/var-run-cvmfs:/var/run/cvmfs,$EESSI_TMPDIR/var-lib-cvmfs:/var/lib/cvmfs,$EESSI_TMPDIR,nessi.uiocloud.no:/etc/cvmfs/keys/nessi.uiocloud.no,nessi.uiocloud.no.conf:/etc/cvmfs/domain.d/nessi.uiocloud.no.conf,default.local:/etc/cvmfs/default.local" if [ -z $SINGULARITY_BIND ]; then export SINGULARITY_BIND="$BIND_PATHS" else @@ -56,8 +58,8 @@ if [ -z $SINGULARITY_HOME ]; then fi # set environment variables for fuse mounts in Singularity container -export EESSI_PILOT_READONLY="container:cvmfs2 pilot.eessi-hpc.org /cvmfs_ro/pilot.eessi-hpc.org" -export EESSI_PILOT_WRITABLE_OVERLAY="container:fuse-overlayfs -o lowerdir=/cvmfs_ro/pilot.eessi-hpc.org -o upperdir=$EESSI_TMPDIR/overlay-upper -o workdir=$EESSI_TMPDIR/overlay-work /cvmfs/pilot.eessi-hpc.org" +export EESSI_PILOT_READONLY="container:cvmfs2 pilot.nessi.uiocloud.no /cvmfs_ro/pilot.nessi.uiocloud.no" +export EESSI_PILOT_WRITABLE_OVERLAY="container:fuse-overlayfs -o lowerdir=/cvmfs_ro/pilot.nessi.uiocloud.no -o upperdir=$EESSI_TMPDIR/overlay-upper -o workdir=$EESSI_TMPDIR/overlay-work /cvmfs/pilot.nessi.uiocloud.no" if [ "$SHELL_OR_RUN" == "shell" ]; then # start shell in Singularity container, with EESSI repository mounted with writable overlay diff --git a/create_init_tarball.sh b/create_init_tarball.sh index 3393285a33..4d0a2dacaa 100755 --- a/create_init_tarball.sh +++ b/create_init_tarball.sh @@ -1,6 +1,6 @@ #!/bin/bash -SOFTWARE_LAYER_TARBALL_URL=https://github.com/EESSI/software-layer/tarball/main +SOFTWARE_LAYER_TARBALL_URL=https://github.com/trz42/software-layer/tarball/main set -eo pipefail diff --git a/create_tarball.sh b/create_tarball.sh index 619d6ea2e1..6cbbe0795b 100755 --- a/create_tarball.sh +++ b/create_tarball.sh @@ -2,20 +2,86 @@ set -e -if [ $# -ne 4 ]; then - echo "ERROR: Usage: $0 " >&2 +if [ $# -lt 3 ]; then + echo "ERROR: Usage: $0 " >&2 exit 1 fi eessi_tmpdir=$1 -pilot_version=$2 -cpu_arch_subdir=$3 -target_tgz=$4 +component=$2 +basedir=$3 + +# 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 " OPTIONS" + echo " -g | --generic - instructs script to tar files of generic architecture target" + echo " -h | --help - display this usage information" +} + +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 + ;; + -*|--*) + 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)) + +source $TOPDIR/utils.sh + +# need to source minimal_eessi_env early to have EESSI_CPU_FAMILY defined +source $TOPDIR/init/minimal_eessi_env + +if [ -d $EESSI_CVMFS_REPO ]; then + echo_green "$EESSI_CVMFS_REPO available, OK!" +else + fatal_error "$EESSI_CVMFS_REPO is not available!" +fi + +if [[ "$EASYBUILD_OPTARCH" == "GENERIC" ]]; then + echo_yellow ">> Tar'ing GENERIC build, taking appropriate measures!" + export EESSI_SOFTWARE_SUBDIR_OVERRIDE=${EESSI_CPU_FAMILY}/generic +fi + +# if EESSI_SOFTWARE_SUBDIR not set get it (note can be overridden by EESSI_SOFTWARE_SUBDIR_OVERRIDE) +if [ -z $EESSI_SOFTWARE_SUBDIR ]; then + source init/eessi_environment_variables +fi + +cpu_arch_subdir=${EESSI_SOFTWARE_SUBDIR} +cpu_arch_subdir_converted=$(echo ${EESSI_SOFTWARE_SUBDIR} | tr '/' '-') +pilot_version=$EESSI_PILOT_VERSION + +timestamp=$(date +%s) +export target_tgz=$(printf "%s/eessi-%s-%s-%s-%s-%d.tar.gz" ${basedir} ${EESSI_PILOT_VERSION} ${component} ${EESSI_OS_TYPE} ${cpu_arch_subdir_converted} ${timestamp}) tmpdir=`mktemp -d` echo ">> tmpdir: $tmpdir" os="linux" -cvmfs_repo="/cvmfs/pilot.eessi-hpc.org" +cvmfs_repo="/cvmfs/pilot.nessi.uiocloud.no" software_dir="${cvmfs_repo}/versions/${pilot_version}/software/${os}/${cpu_arch_subdir}" if [ ! -d ${software_dir} ]; then diff --git a/default.local b/default.local new file mode 100644 index 0000000000..bda088a88d --- /dev/null +++ b/default.local @@ -0,0 +1,2 @@ +CVMFS_QUOTA_LIMIT=10000 +CVMFS_HTTP_PROXY=DIRECT diff --git a/eessi-2021.12.yml b/eessi-2021.12.yml index f3ed9dd9c4..56659b3dc2 100644 --- a/eessi-2021.12.yml +++ b/eessi-2021.12.yml @@ -1,55 +1 @@ software: - R-bundle-Bioconductor: - toolchains: - foss-2020a: - versions: - '3.11': - versionsuffix: -R-4.0.0 - GROMACS: - toolchains: - foss-2020a: - versions: - '2020.1': - versionsuffix: -Python-3.8.2 - '2020.4': - versionsuffix: -Python-3.8.2 - Horovod: - toolchains: - foss-2020a: - versions: - '0.21.3': - versionsuffix: -TensorFlow-2.3.1-Python-3.8.2 - OpenFOAM: - toolchains: - foss-2020a: - versions: ['8', 'v2006'] - OSU-Micro-Benchmarks: - toolchains: - gompi-2020a: - versions: ['5.6.3'] - QuantumESPRESSO: - toolchains: - foss-2020a: - versions: ['6.6'] - TensorFlow: - toolchains: - foss-2020a: - versions: - '2.3.1': - versionsuffix: -Python-3.8.2 - RStudio-Server: - toolchains: - foss-2020a: - versions: - '1.3.1093': - versionsuffix: -Java-11-R-4.0.0 - code-server: - toolchains: - SYSTEM: - versions: '3.7.3' - WRF: - toolchains: - foss-2020a: - versions: - '3.9.1.1': - versionsuffix: -dmpar diff --git a/init/eessi_environment_variables b/init/eessi_environment_variables index 34dc8f9f98..199b1facc5 100644 --- a/init/eessi_environment_variables +++ b/init/eessi_environment_variables @@ -18,6 +18,8 @@ function error() { # set up minimal environment: $EESSI_PREFIX, $EESSI_PILOT_VERSION, $EESSI_OS_TYPE, $EESSI_CPU_FAMILY, $EPREFIX source $EESSI_INIT_DIR_PATH/minimal_eessi_env +echo "minimal_eessi_env: EESSI_PREFIX=${EESSI_PREFIX}= EESSI_OS_TYPE=${EESSI_OS_TYPE}= EESSI_CPU_FAMILY=${EESSI_CPU_FAMILY}=" >> $output + if [ -d $EESSI_PREFIX ]; then echo "Found EESSI pilot repo @ $EESSI_PREFIX!" >> $output diff --git a/init/minimal_eessi_env b/init/minimal_eessi_env index 39478d5c4c..78a60e192e 100644 --- a/init/minimal_eessi_env +++ b/init/minimal_eessi_env @@ -1,6 +1,6 @@ # define minimal EESSI environment, without relying on external scripts -export EESSI_CVMFS_REPO="/cvmfs/pilot.eessi-hpc.org" +export EESSI_CVMFS_REPO="/cvmfs/pilot.nessi.uiocloud.no" export EESSI_PILOT_VERSION="${EESSI_PILOT_VERSION_OVERRIDE:=2021.12}" export EESSI_PREFIX=$EESSI_CVMFS_REPO/versions/$EESSI_PILOT_VERSION 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 "$@" diff --git a/nessi.uiocloud.no.conf b/nessi.uiocloud.no.conf new file mode 100644 index 0000000000..788e9b4784 --- /dev/null +++ b/nessi.uiocloud.no.conf @@ -0,0 +1,4 @@ +## This file is maintained by Ansible - CHANGES WILL BE OVERWRITTEN +CVMFS_SERVER_URL="http://eessi-bot-devel_stratum1-0.nessi.uiocloud.no/cvmfs/@fqrn@" +CVMFS_KEYS_DIR=/etc/cvmfs/keys/nessi.uiocloud.no +CVMFS_USE_GEOAPI="yes" diff --git a/nessi.uiocloud.no/pilot.nessi.uiocloud.no.pub b/nessi.uiocloud.no/pilot.nessi.uiocloud.no.pub new file mode 100644 index 0000000000..299f8870f8 --- /dev/null +++ b/nessi.uiocloud.no/pilot.nessi.uiocloud.no.pub @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlPvj6cGKY/IH58gCJaQa +SqlJh1JqmNwjhwVQwUCW4VhGhKc7zX3rbDCRge4UOGNXb6/WTBipz8S3lGJ20O6m +1fE+SlujCib269oPRh2Mxd9ZYwjXB29+lVWT6s/L6QxMg4lCUQ83Kz6/sV1KycDF +myDxT0S/xgJ8n94eBCM5hxrrPoAAHChcyy403EIPhUN6zdskZq/qA83sm21PiYjq +NQhzWagLOnbJvXjKApyIfcg10P5pGCN5mROWIoerW34lpPmEgezFQpJE4re5JMzM +xQCbwYFydVPgVWJ+CmJZKG7dxirox6vbO3ukWMGUFfv9tQ+TmlZfl8fq8mHGdtIW +LQIDAQAB +-----END PUBLIC KEY----- diff --git a/run_in_compat_layer_env.sh b/run_in_compat_layer_env.sh index 118aac65d5..f05d14caae 100755 --- a/run_in_compat_layer_env.sh +++ b/run_in_compat_layer_env.sh @@ -1,9 +1,11 @@ #!/bin/bash +echo "is env var EASYBUILD_OPTARCH set?" +env | grep -i EASYBUILD_OPTARCH | sed -e 's/^/run_in_compat_layer.sh:/' if [ -z $EESSI_PILOT_VERSION ]; then echo "ERROR: \$EESSI_PILOT_VERSION must be set!" >&2 exit 1 fi -EESSI_COMPAT_LAYER_DIR="/cvmfs/pilot.eessi-hpc.org/versions/${EESSI_PILOT_VERSION}/compat/linux/$(uname -m)" +EESSI_COMPAT_LAYER_DIR="/cvmfs/pilot.nessi.uiocloud.no/versions/${EESSI_PILOT_VERSION}/compat/linux/$(uname -m)" if [ ! -d ${EESSI_COMPAT_LAYER_DIR} ]; then echo "ERROR: ${EESSI_COMPAT_LAYER_DIR} does not exist!" >&2 exit 1