Skip to content

Commit

Permalink
Merge branch '2023.06' into ReFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
boegel committed Sep 5, 2023
2 parents e439db5 + 95a1d42 commit 410303c
Show file tree
Hide file tree
Showing 11 changed files with 140 additions and 5 deletions.
2 changes: 1 addition & 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 Down
46 changes: 46 additions & 0 deletions 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 @@ -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
3 changes: 3 additions & 0 deletions 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
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
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,
}
5 changes: 5 additions & 0 deletions eessi-2023.06-eb-4.7.2-2021a.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ easyconfigs:
- libjpeg-turbo-2.0.6-GCCcore-10.3.0.eb
- QuantumESPRESSO-6.7-foss-2021a.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
6 changes: 6 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,9 @@ 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
- 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
3 changes: 3 additions & 0 deletions eessi-2023.06-eb-4.7.2-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ easyconfigs:
options:
from-pr: 18320
rebuild: True
- EasyBuild-4.8.0.eb:
options:
from-pr: 18282
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 410303c

Please sign in to comment.