Skip to content

Commit

Permalink
Merge branch '2023.06' into eessi-2023.06-WRF-dmpar/4.3-foss/2021a
Browse files Browse the repository at this point in the history
  • Loading branch information
TopRichard authored Sep 18, 2023
2 parents 71d00b0 + 41fbcd7 commit 59af092
Show file tree
Hide file tree
Showing 17 changed files with 189 additions and 10 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/test_eessi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
eessi_pilot_repo:
pilot:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
Expand All @@ -25,6 +25,11 @@ jobs:
- eessi-2023.06-eb-4.7.2-2021b.yml
- eessi-2023.06-eb-4.7.2-2022a.yml
- eessi-2023.06-eb-4.7.2-2022b.yml
- eessi-2023.06-eb-4.7.2-system.yml
- eessi-2023.06-eb-4.8.0-2021a.yml
- eessi-2023.06-eb-4.8.0-system.yml
- eessi-2023.06-eb-4.8.0-2021b.yml
- eessi-2023.06-eb-4.8.1-system.yml
steps:
- name: Check out software-layer repository
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
Expand Down
48 changes: 47 additions & 1 deletion EESSI-pilot-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,37 @@ display_help() {
echo " -y | --https-proxy URL - provides URL for the environment variable https_proxy"
}

function copy_build_log() {
# copy specified build log to specified directory, with some context added
build_log=${1}
build_logs_dir=${2}

# also copy to build logs directory, if specified
if [ ! -z "${build_logs_dir}" ]; then
log_filename="$(basename ${build_log})"
if [ ! -z "${SLURM_JOB_ID}" ]; then
# use subdirectory for build log in context of a Slurm job
build_log_path="${build_logs_dir}/jobs/${SLURM_JOB_ID}/${log_filename}"
else
build_log_path="${build_logs_dir}/non-jobs/${log_filename}"
fi
mkdir -p $(dirname ${build_log_path})
cp -a ${build_log} ${build_log_path}
chmod 0644 ${build_log_path}

# add context to end of copied log file
echo >> ${build_log_path}
echo "Context from which build log was copied:" >> ${build_log_path}
echo "- original path of build log: ${build_log}" >> ${build_log_path}
echo "- working directory: ${PWD}" >> ${build_log_path}
echo "- Slurm job ID: ${SLURM_OUT}" >> ${build_log_path}
echo "- EasyBuild version: ${eb_version}" >> ${build_log_path}
echo "- easystack file: ${es}" >> ${build_log_path}

echo "EasyBuild log file ${build_log} copied to ${build_log_path} (with context appended)"
fi
}

POSITIONAL_ARGS=()

while [[ $# -gt 0 ]]; do
Expand All @@ -35,6 +66,10 @@ while [[ $# -gt 0 ]]; do
export https_proxy="$2"
shift 2
;;
--build-logs-dir)
export build_logs_dir="${2}"
shift 2
;;
-*|--*)
echo "Error: Unknown option: $1" >&2
exit 1
Expand Down Expand Up @@ -137,7 +172,7 @@ else
echo_green ">> MODULEPATH set up: ${MODULEPATH}"
fi

for eb_version in '4.7.2'; do
for eb_version in '4.7.2' '4.8.0' '4.8.1'; do

# load EasyBuild module (will be installed if it's not available yet)
source ${TOPDIR}/load_easybuild_module.sh ${eb_version}
Expand All @@ -150,6 +185,17 @@ for eb_version in '4.7.2'; do
echo_green "Feeding easystack file ${es} to EasyBuild..."

${EB} --easystack ${TOPDIR}/${es} --robot
ec=$?

# copy EasyBuild log file if EasyBuild exited with an error
if [ ${ec} -ne 0 ]; then
eb_last_log=$(unset EB_VERBOSE; eb --last-log)
# copy to current working directory
cp -a ${eb_last_log} .
echo "Last EasyBuild log file copied from ${eb_last_log} to ${PWD}"
# copy to build logs dir (with context added)
copy_build_log "${eb_last_log}" "${build_logs_dir}"
fi

$TOPDIR/check_missing_installations.sh ${TOPDIR}/${es}
else
Expand Down
5 changes: 4 additions & 1 deletion bot/bot-eessi-aws-citc.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ command_response_fmt =
# name of the job script used for building an EESSI stack
build_job_script = /mnt/shared/home/bot/eessi-bot-software-layer/scripts/bot-build.slurm

# Path (directory) to which build logs for (only) failing builds should be copied by bot/build.sh script
build_logs_dir = /mnt/shared/bot-build-logs

# The container_cachedir may be used to reuse downloaded container image files
# across jobs. Thus, jobs can more quickly launch containers.
container_cachedir = /mnt/shared/home/bot/eessi-bot-software-layer/containers-cache-dir
Expand Down Expand Up @@ -123,7 +126,7 @@ bucket_name = eessi-staging-2023.06
# only upload the latest built artefact
# 'once' : only once upload any built artefact for the build target
# 'none' : do not upload any built artefacts
upload_policy = once
upload_policy = latest

# which GH account has the permission to trigger the deployment (by setting
# the label 'bot:deploy' (apparently this cannot be restricted on GitHub)
Expand Down
20 changes: 16 additions & 4 deletions bot/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ LOCAL_TMP=$(cfg_get_value "site_config" "local_tmp")
echo "bot/build.sh: LOCAL_TMP='${LOCAL_TMP}'"
# TODO should local_tmp be mandatory? --> then we check here and exit if it is not provided

# check if path to copy build logs to is specified, so we can copy build logs for failing builds there
BUILD_LOGS_DIR=$(cfg_get_value "site_config" "build_logs_dir")
echo "bot/build.sh: BUILD_LOGS_DIR='${BUILD_LOGS_DIR}'"
# if $BUILD_LOGS_DIR is set, add it to $SINGULARITY_BIND so the path is available in the build container
mkdir -p ${BUILD_LOGS_DIR}
if [[ -z ${SINGULARITY_BIND} ]]; then
export SINGULARITY_BIND="${BUILD_LOGS_DIR}"
else
export SINGULARITY_BIND="${SINGULARITY_BIND},${BUILD_LOGS_DIR}"
fi

SINGULARITY_CACHEDIR=$(cfg_get_value "site_config" "container_cachedir")
echo "bot/build.sh: SINGULARITY_CACHEDIR='${SINGULARITY_CACHEDIR}'"
if [[ ! -z ${SINGULARITY_CACHEDIR} ]]; then
Expand Down Expand Up @@ -151,19 +162,20 @@ BUILD_STEP_ARGS+=("--save" "${TARBALL_TMP_BUILD_STEP_DIR}")
BUILD_STEP_ARGS+=("--storage" "${STORAGE}")

# prepare arguments to install_software_layer.sh (specific to build step)
GENERIC_OPT=
declare -a INSTALL_SCRIPT_ARGS=()
if [[ ${EESSI_SOFTWARE_SUBDIR_OVERRIDE} =~ .*/generic$ ]]; then
GENERIC_OPT="--generic"
INSTALL_SCRIPT_ARGS+=("--generic")
fi
[[ ! -z ${BUILD_LOGS_DIR} ]] && INSTALL_SCRIPT_ARGS+=("--build-logs-dir" "${BUILD_LOGS_DIR}")

# create tmp file for output of build step
build_outerr=$(mktemp build.outerr.XXXX)

echo "Executing command to build software:"
echo "./eessi_container.sh ${COMMON_ARGS[@]} ${BUILD_STEP_ARGS[@]}"
echo " -- ./install_software_layer.sh ${GENERIC_OPT} \"$@\" 2>&1 | tee -a ${build_outerr}"
echo " -- ./install_software_layer.sh \"${INSTALL_SCRIPT_ARGS[@]}\" \"$@\" 2>&1 | tee -a ${build_outerr}"
./eessi_container.sh "${COMMON_ARGS[@]}" "${BUILD_STEP_ARGS[@]}" \
-- ./install_software_layer.sh ${GENERIC_OPT} "$@" 2>&1 | tee -a ${build_outerr}
-- ./install_software_layer.sh "${INSTALL_SCRIPT_ARGS[@]}" "$@" 2>&1 | tee -a ${build_outerr}

# prepare directory to store tarball of tmp for tarball step
TARBALL_TMP_TARBALL_STEP_DIR=${PREVIOUS_TMP_DIR}/tarball_step
Expand Down
2 changes: 1 addition & 1 deletion configure_easybuild
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fi
# note: filtering Bison may break some installations, like Qt5 (see https://github.com/EESSI/software-layer/issues/49)
# filtering pkg-config breaks R-bundle-Bioconductor installation (see also https://github.com/easybuilders/easybuild-easyconfigs/pull/11104)
# problems occur when filtering pkg-config with gnuplot too (picks up Lua 5.1 from $EPREFIX rather than from Lua 5.3 dependency)
DEPS_TO_FILTER=Autoconf,Automake,Autotools,binutils,bzip2,cURL,DBus,flex,gettext,gperf,help2man,intltool,libreadline,libtool,Lua,M4,makeinfo,ncurses,util-linux,XZ,zlib
DEPS_TO_FILTER=Autoconf,Automake,Autotools,binutils,bzip2,DBus,flex,gettext,gperf,help2man,intltool,libreadline,libtool,Lua,M4,makeinfo,ncurses,util-linux,XZ,zlib
# For aarch64 we need to also filter out Yasm.
# See https://github.com/easybuilders/easybuild-easyconfigs/issues/11190
if [[ "$EESSI_CPU_FAMILY" == "aarch64" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion create_tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if [ -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules ]; then
find ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules -type l | grep -v '/\.wh\.' >> ${files_list}
# module files and symlinks
find ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules/all -type f -o -type l \
| grep -v '/\.wh\.' | sed -e 's/.lua$//' | sed -e 's@.*/modules/all/@@g' | sort -u \
| grep -v '/\.wh\.' | grep -v '/\.modulerc\.lua' | sed -e 's/.lua$//' | sed -e 's@.*/modules/all/@@g' | sort -u \
>> ${module_files_list}
fi
if [ -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/software -a -r ${module_files_list} ]; then
Expand Down
51 changes: 51 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,37 @@ def parse_hook_fontconfig_add_fonts(ec, eprefix):
raise EasyBuildError("fontconfig-specific hook triggered for non-fontconfig easyconfig?!")


def parse_hook_openblas_relax_lapack_tests_num_errors(ec, eprefix):
"""Relax number of failing numerical LAPACK tests on Arm 64-bit systems."""
if ec.name == 'OpenBLAS':
# relax maximum number of failed numerical LAPACK tests on Arm 64-bit systems,
# since the default setting of 150 that works well on x86_64 is a bit too strict
# See https://github.com/EESSI/software-layer/issues/314
cfg_option = 'max_failing_lapack_tests_num_errors'
if get_cpu_architecture() == AARCH64:
orig_value = ec[cfg_option]
ec[cfg_option] = 400
print_msg("Maximum number of failing LAPACK tests with numerical errors for %s relaxed to %s (was %s)",
ec.name, ec[cfg_option], orig_value)
else:
print_msg("Not changing option %s for %s on non-AARCH64", cfg_option, ec.name)
else:
raise EasyBuildError("OpenBLAS-specific hook triggered for non-OpenBLAS easyconfig?!")


def parse_hook_qt5_check_qtwebengine_disable(ec, eprefix):
"""
Disable check for QtWebEngine in Qt5 as workaround for problem with determining glibc version.
"""
if ec.name == 'Qt5':
# workaround for glibc version being reported as "UNKNOWN" in Gentoo Prefix environment by EasyBuild v4.7.2,
# see also https://github.com/easybuilders/easybuild-framework/pull/4290
ec['check_qtwebengine'] = False
print_msg("Checking for QtWebEgine in Qt5 installation has been disabled")
else:
raise EasyBuildError("Qt5-specific hook triggered for non-Qt5 easyconfig?!")


def parse_hook_ucx_eprefix(ec, eprefix):
"""Make UCX aware of compatibility layer via additional configuration options."""
if ec.name == 'UCX':
Expand Down Expand Up @@ -228,10 +259,26 @@ def pre_configure_hook_wrf_aarch64(self, *args, **kwargs):
else:
raise EasyBuildError("WRF-specific hook triggered for non-WRF easyconfig?!")

def pre_test_hook(self,*args, **kwargs):
"""Main pre-test hook: trigger custom functions based on software name."""
if self.name in PRE_TEST_HOOKS:
PRE_TEST_HOOKS[self.name](self, *args, **kwargs)

def pre_test_hook_ignore_failing_tests_SciPybundle(self, *args, **kwargs):
"""
Pre-test hook for SciPy-bundle: skip failing tests for SciPy-bundle 2021.10 (currently the only version that is failing).
In previous versions we were not as strict yet on the numpy/SciPy tests
"""
cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR')
if self.name == 'SciPy-bundle' and self.version == '2021.10' and cpu_target == 'aarch64/neoverse_v1':
self.cfg['testopts'] = "|| echo ignoring failing tests"


PARSE_HOOKS = {
'CGAL': parse_hook_cgal_toolchainopts_precise,
'fontconfig': parse_hook_fontconfig_add_fonts,
'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors,
'Qt5': parse_hook_qt5_check_qtwebengine_disable,
'UCX': parse_hook_ucx_eprefix,
}

Expand All @@ -245,3 +292,7 @@ def pre_configure_hook_wrf_aarch64(self, *args, **kwargs):
'OpenBLAS': pre_configure_hook_openblas_optarch_generic,
'WRF': pre_configure_hook_wrf_aarch64,
}

PRE_TEST_HOOKS = {
'SciPy-bundle': pre_test_hook_ignore_failing_tests_SciPybundle,
}
19 changes: 18 additions & 1 deletion eessi-2023.06-eb-4.7.2-2021a.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,22 @@ easyconfigs:
- foss-2021a
- libpng-1.6.37-GCCcore-10.3.0.eb:
- libjpeg-turbo-2.0.6-GCCcore-10.3.0.eb
- git-2.32.0-GCCcore-10.3.0-nodocs.eb
- QuantumESPRESSO-6.7-foss-2021a.eb
- WRF-4.3-foss-2021a-dmpar.eb
- GROMACS-2021.3-foss-2021a.eb
- Qt5-5.15.2-GCCcore-10.3.0.eb:
# add missing patch files for Qt5 5.15.2 to fix build problems with glibc 2.34,
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/18087
options:
from-pr: 18087
- RapidJSON-1.1.0-GCCcore-10.3.0.eb:
# strip out hardcoded -march=native,
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/18725
options:
from-pr: 18725
- Arrow-6.0.0-foss-2021a.eb:
# fix installation of pyarrow Python bindings
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/18348
options:
from-pr: 18348
- WRF-4.3-foss-2021a-dmpar.eb
7 changes: 7 additions & 0 deletions eessi-2023.06-eb-4.7.2-2021b.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ easyconfigs:
include-easyblocks-from-pr: 2248
- zlib-1.2.11-GCCcore-11.2.0
- OpenMPI-4.1.1-GCC-11.2.0
- gompi-2021b
- FlexiBLAS-3.0.4-GCC-11.2.0.eb
- foss-2021b.eb
- git-2.33.1-GCCcore-11.2.0-nodocs.eb
- QuantumESPRESSO-6.8-foss-2021b.eb
- SciPy-bundle-2021.10-foss-2021b
- GROMACS-2021.5-foss-2021b.eb
1 change: 1 addition & 0 deletions eessi-2023.06-eb-4.7.2-2022a.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
easyconfigs:
- GCC-11.3.0
- OpenMPI-4.1.4-GCC-11.3.0.eb
5 changes: 5 additions & 0 deletions eessi-2023.06-eb-4.7.2-2022b.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
easyconfigs:
- GCC-12.2.0
- OpenMPI-4.1.4-GCC-12.2.0
- CMake-3.24.3-GCCcore-12.2.0.eb:
options:
include-easyblocks-from-pr: 2248
- foss-2022b
7 changes: 7 additions & 0 deletions eessi-2023.06-eb-4.7.2-system.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
easyconfigs:
- ReFrame-4.2.0.eb:
options:
from-pr: 18320
- EasyBuild-4.8.0.eb:
options:
from-pr: 18282
2 changes: 2 additions & 0 deletions eessi-2023.06-eb-4.8.0-2021a.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
easyconfigs:
- GDAL-3.3.0-foss-2021a.eb
7 changes: 7 additions & 0 deletions eessi-2023.06-eb-4.8.0-2021b.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
easyconfigs:
- MPFR-4.1.0-GCCcore-11.2.0.eb:
# use patch for MPFR 4.1.0 to fix failing tsprintf test with glibc >= 2.37,
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/18746
options:
from-pr: 18746
- OpenFOAM-v2112-foss-2021b.eb
10 changes: 10 additions & 0 deletions eessi-2023.06-eb-4.8.0-system.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
easyconfigs:
- Java-11.eb:
# patch Java binaries/libraries when using alternate sysroot to ensure correct glibc & co are picked up
# see https://github.com/easybuilders/easybuild-easyblocks/pull/2557
# + https://github.com/easybuilders/easybuild-easyblocks/pull/2995
options:
include-easyblocks-from-pr: 2995
- EasyBuild-4.8.1.eb:
options:
from-pr: 18761
3 changes: 3 additions & 0 deletions eessi-2023.06-eb-4.8.1-system.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
easyconfigs:
# rebuilt with EasyBuild v4.8.1 (now wraps around Java/11.0.20)
- Java-11.eb
3 changes: 3 additions & 0 deletions run_in_compat_layer_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ if [ ! -d ${EESSI_COMPAT_LAYER_DIR} ]; then
fi

INPUT=$(echo "$@")
if [ ! -z ${SLURM_JOB_ID} ]; then
INPUT="export SLURM_JOB_ID=${SLURM_JOB_ID}; ${INPUT}"
fi
if [ ! -z ${EESSI_SOFTWARE_SUBDIR_OVERRIDE} ]; then
INPUT="export EESSI_SOFTWARE_SUBDIR_OVERRIDE=${EESSI_SOFTWARE_SUBDIR_OVERRIDE}; ${INPUT}"
fi
Expand Down

0 comments on commit 59af092

Please sign in to comment.