From 05d85a9d2790e29c59f203ca4f695afeb7f07cec Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Fri, 18 Aug 2023 14:41:01 +0200 Subject: [PATCH 01/40] initial version for bot/inspect.sh --- bot/inspect.sh | 240 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 bot/inspect.sh diff --git a/bot/inspect.sh b/bot/inspect.sh new file mode 100644 index 0000000000..39ac7ceb99 --- /dev/null +++ b/bot/inspect.sh @@ -0,0 +1,240 @@ +#!/usr/bin/env bash +# +# Script to inspect result of a build job for the EESSI software layer. +# Intended use is that it is called with a path to a job directory. +# +# This script is part of the EESSI software layer, see +# https://github.com/EESSI/software-layer.git +# +# author: Thomas Roeblitz (@trz42) +# +# license: GPLv2 +# + +# ASSUMPTIONs: +# - Script is executed on the same architecture the job was running on. +# - Initially, we also assume that is run on the same resource with the +# same (compute) node setup (local disk space, HTTP proxies, etc.) +# - The job directory being supplied has been prepared by the bot with a +# checkout of a pull request (OR by some other means) +# - The job directory contains a directory 'cfg' where the main config +# file 'job.cfg' has been deposited. +# - The 'cfg' directory may contain any additional files referenced in +# 'job.cfg' (repos.cfg, etc.). +# - The job produced some tarballs for its state (tmp disk for overlayfs, +# CVMFS cache, etc.) under 'previous_tmp/{build,tarball}_step'. + +# stop as soon as something fails +set -e + +display_help() { + echo "usage: $0 [OPTIONS]" + echo " -h | --help - display this usage information" + echo " -j | --job-dir DIR - inspect job with the given work directory DIR" + 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" +} + +job_dir= +http_proxy= +https_proxy= + +POSITIONAL_ARGS=() + +while [[ $# -gt 0 ]]; do + case ${1} in + -h|--help) + display_help + exit 0 + ;; + -j|--job-dir) + export job_dir="${2}" + shift 2 + ;; + -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[@]}" + +# source utils.sh and cfg_files.sh +source scripts/utils.sh +source scripts/cfg_files.sh + +if [[ -z ${job_dir} ]]; then + echo_yellow "path to job directory missing" + display_help + exit 1 +fi + +# defaults +export JOB_CFG_FILE="${job_dir}/cfg/job.cfg}" +HOST_ARCH=$(uname -m) + +# check if ${JOB_CFG_FILE} exists +if [[ ! -r "${JOB_CFG_FILE}" ]]; then + fatal_error "job config file (JOB_CFG_FILE=${JOB_CFG_FILE}) does not exist or not readable" +fi +echo "bot/inspect.sh: showing ${JOB_CFG_FILE} from software-layer side" +cat ${JOB_CFG_FILE} + +echo "bot/inspect.sh: obtaining configuration settings from '${JOB_CFG_FILE}'" +cfg_load ${JOB_CFG_FILE} + +# if http_proxy is defined in ${JOB_CFG_FILE} use it, if not use env var $http_proxy +HTTP_PROXY=$(cfg_get_value "site_config" "http_proxy") +HTTP_PROXY=${HTTP_PROXY:-${http_proxy}} +echo "bot/inspect.sh: HTTP_PROXY='${HTTP_PROXY}'" + +# if https_proxy is defined in ${JOB_CFG_FILE} use it, if not use env var $https_proxy +HTTPS_PROXY=$(cfg_get_value "site_config" "https_proxy") +HTTPS_PROXY=${HTTPS_PROXY:-${https_proxy}} +echo "bot/build.sh: HTTPS_PROXY='${HTTPS_PROXY}'" + +LOCAL_TMP=$(cfg_get_value "site_config" "local_tmp") +echo "bot/inspect.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/inspect.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 +if [[ ! -z ${BUILD_LOGS_DIR} ]]; then + 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 +fi + +SINGULARITY_CACHEDIR=$(cfg_get_value "site_config" "container_cachedir") +echo "bot/inspect.sh: SINGULARITY_CACHEDIR='${SINGULARITY_CACHEDIR}'" +if [[ ! -z ${SINGULARITY_CACHEDIR} ]]; then + # make sure that separate directories are used for different CPU families + SINGULARITY_CACHEDIR=${SINGULARITY_CACHEDIR}/${HOST_ARCH} + export SINGULARITY_CACHEDIR +fi + +echo -n "setting \$STORAGE by replacing any var in '${LOCAL_TMP}' -> " +# replace any env variable in ${LOCAL_TMP} with its +# current value (e.g., a value that is local to the job) +STORAGE=$(envsubst <<< ${LOCAL_TMP}) +echo "'${STORAGE}'" + +# make sure ${STORAGE} exists +mkdir -p ${STORAGE} + +# make sure the base tmp storage is unique +JOB_STORAGE=$(mktemp --directory --tmpdir=${STORAGE} bot_job_tmp_XXX) +echo "bot/inspect.sh: created unique base tmp storage directory at ${JOB_STORAGE}" + +# obtain list of modules to be loaded +LOAD_MODULES=$(cfg_get_value "site_config" "load_modules") +echo "bot/inspect.sh: LOAD_MODULES='${LOAD_MODULES}'" + +# singularity/apptainer settings: CONTAINER, HOME, TMPDIR, BIND +CONTAINER=$(cfg_get_value "repository" "container") +export SINGULARITY_HOME="${PWD}:/eessi_bot_job" +export SINGULARITY_TMPDIR="${PWD}/singularity_tmpdir" +mkdir -p ${SINGULARITY_TMPDIR} + +# load modules if LOAD_MODULES is not empty +if [[ ! -z ${LOAD_MODULES} ]]; then + for mod in $(echo ${LOAD_MODULES} | tr ',' '\n') + do + echo "bot/inspect.sh: loading module '${mod}'" + module load ${mod} + done +else + echo "bot/inspect.sh: no modules to be loaded" +fi + +# determine repository to be used from entry .repository in ${JOB_CFG_FILE} +REPOSITORY=$(cfg_get_value "repository" "repo_id") +EESSI_REPOS_CFG_DIR_OVERRIDE=$(cfg_get_value "repository" "repos_cfg_dir") +export EESSI_REPOS_CFG_DIR_OVERRIDE=${EESSI_REPOS_CFG_DIR_OVERRIDE:-${PWD}/cfg} +echo "bot/inspect.sh: EESSI_REPOS_CFG_DIR_OVERRIDE='${EESSI_REPOS_CFG_DIR_OVERRIDE}'" + +# determine pilot version to be used from .repository.repo_version in ${JOB_CFG_FILE} +# here, just set & export EESSI_PILOT_VERSION_OVERRIDE +# next script (eessi_container.sh) makes use of it via sourcing init scripts +# (e.g., init/eessi_defaults or init/minimal_eessi_env) +export EESSI_PILOT_VERSION_OVERRIDE=$(cfg_get_value "repository" "repo_version") +echo "bot/inspect.sh: EESSI_PILOT_VERSION_OVERRIDE='${EESSI_PILOT_VERSION_OVERRIDE}'" + +# determine CVMFS repo to be used from .repository.repo_name in ${JOB_CFG_FILE} +# here, just set EESSI_CVMFS_REPO_OVERRIDE, a bit further down +# "source init/eessi_defaults" via sourcing init/minimal_eessi_env +export EESSI_CVMFS_REPO_OVERRIDE=$(cfg_get_value "repository" "repo_name") +echo "bot/inspect.sh: EESSI_CVMFS_REPO_OVERRIDE='${EESSI_CVMFS_REPO_OVERRIDE}'" + +# determine architecture to be used from entry .architecture in ${JOB_CFG_FILE} +# fallbacks: +# - ${CPU_TARGET} handed over from bot +# - left empty to let downstream script(s) determine subdir to be used +EESSI_SOFTWARE_SUBDIR_OVERRIDE=$(cfg_get_value "architecture" "software_subdir") +EESSI_SOFTWARE_SUBDIR_OVERRIDE=${EESSI_SOFTWARE_SUBDIR_OVERRIDE:-${CPU_TARGET}} +export EESSI_SOFTWARE_SUBDIR_OVERRIDE +echo "bot/inspect.sh: EESSI_SOFTWARE_SUBDIR_OVERRIDE='${EESSI_SOFTWARE_SUBDIR_OVERRIDE}'" + +# get EESSI_OS_TYPE from .architecture.os_type in ${JOB_CFG_FILE} (default: linux) +EESSI_OS_TYPE=$(cfg_get_value "architecture" "os_type") +export EESSI_OS_TYPE=${EESSI_OS_TYPE:-linux} +echo "bot/inspect.sh: EESSI_OS_TYPE='${EESSI_OS_TYPE}'" + +# prepare arguments to eessi_container.sh common to build and tarball steps +declare -a COMMON_ARGS=() +COMMON_ARGS+=("--verbose") +COMMON_ARGS+=("--access" "rw") +COMMON_ARGS+=("--mode" "run") +[[ ! -z ${CONTAINER} ]] && COMMON_ARGS+=("--container" "${CONTAINER}") +[[ ! -z ${HTTP_PROXY} ]] && COMMON_ARGS+=("--http-proxy" "${HTTP_PROXY}") +[[ ! -z ${HTTPS_PROXY} ]] && COMMON_ARGS+=("--https-proxy" "${HTTPS_PROXY}") +[[ ! -z ${REPOSITORY} ]] && COMMON_ARGS+=("--repository" "${REPOSITORY}") + +# make sure to use the same parent dir for storing tarballs of tmp +PREVIOUS_TMP_DIR=${PWD}/previous_tmp + +# prepare directory to store tarball of tmp for build step +TARBALL_TMP_BUILD_STEP_DIR=${PREVIOUS_TMP_DIR}/build_step +mkdir -p ${TARBALL_TMP_BUILD_STEP_DIR} + +# prepare arguments to eessi_container.sh specific to build step +declare -a BUILD_STEP_ARGS=() +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) +declare -a INSTALL_SCRIPT_ARGS=() +if [[ ${EESSI_SOFTWARE_SUBDIR_OVERRIDE} =~ .*/generic$ ]]; then + 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 \"${INSTALL_SCRIPT_ARGS[@]}\" \"$@\" 2>&1 | tee -a ${build_outerr}" +#./eessi_container.sh "${COMMON_ARGS[@]}" "${BUILD_STEP_ARGS[@]}" \ +# -- ./install_software_layer.sh "${INSTALL_SCRIPT_ARGS[@]}" "$@" 2>&1 | tee -a ${build_outerr} + + +exit 0 From 90f1018066a88aa25599c34ed861a34f32366b19 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Fri, 18 Aug 2023 14:45:44 +0200 Subject: [PATCH 02/40] change permissions --- bot/inspect.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bot/inspect.sh diff --git a/bot/inspect.sh b/bot/inspect.sh old mode 100644 new mode 100755 From 0ec406eedc6285a3b7571265892e4a455f51300a Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Fri, 18 Aug 2023 14:53:56 +0200 Subject: [PATCH 03/40] fix cfg file path --- bot/inspect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/inspect.sh b/bot/inspect.sh index 39ac7ceb99..591529a31f 100755 --- a/bot/inspect.sh +++ b/bot/inspect.sh @@ -83,7 +83,7 @@ if [[ -z ${job_dir} ]]; then fi # defaults -export JOB_CFG_FILE="${job_dir}/cfg/job.cfg}" +export JOB_CFG_FILE="${job_dir}/cfg/job.cfg" HOST_ARCH=$(uname -m) # check if ${JOB_CFG_FILE} exists From d3a0457b7665a41b440369eb7710f4d165c9b95f Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Fri, 18 Aug 2023 14:58:14 +0200 Subject: [PATCH 04/40] report more env var settings --- bot/inspect.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bot/inspect.sh b/bot/inspect.sh index 591529a31f..f860169d95 100755 --- a/bot/inspect.sh +++ b/bot/inspect.sh @@ -104,7 +104,7 @@ echo "bot/inspect.sh: HTTP_PROXY='${HTTP_PROXY}'" # if https_proxy is defined in ${JOB_CFG_FILE} use it, if not use env var $https_proxy HTTPS_PROXY=$(cfg_get_value "site_config" "https_proxy") HTTPS_PROXY=${HTTPS_PROXY:-${https_proxy}} -echo "bot/build.sh: HTTPS_PROXY='${HTTPS_PROXY}'" +echo "bot/inspect.sh: HTTPS_PROXY='${HTTPS_PROXY}'" LOCAL_TMP=$(cfg_get_value "site_config" "local_tmp") echo "bot/inspect.sh: LOCAL_TMP='${LOCAL_TMP}'" @@ -150,8 +150,11 @@ echo "bot/inspect.sh: LOAD_MODULES='${LOAD_MODULES}'" # singularity/apptainer settings: CONTAINER, HOME, TMPDIR, BIND CONTAINER=$(cfg_get_value "repository" "container") +echo "bot/inspect.sh: CONTAINER='${CONTAINER}'" export SINGULARITY_HOME="${PWD}:/eessi_bot_job" +echo "bot/inspect.sh: SINGULARITY_HOME='${SINGULARITY_HOME}'" export SINGULARITY_TMPDIR="${PWD}/singularity_tmpdir" +echo "bot/inspect.sh: SINGULARITY_TMPDIR='${SINGULARITY_TMPDIR}'" mkdir -p ${SINGULARITY_TMPDIR} # load modules if LOAD_MODULES is not empty @@ -167,6 +170,7 @@ fi # determine repository to be used from entry .repository in ${JOB_CFG_FILE} REPOSITORY=$(cfg_get_value "repository" "repo_id") +echo "bot/inspect.sh: REPOSITORY='${REPOSITORY}'" EESSI_REPOS_CFG_DIR_OVERRIDE=$(cfg_get_value "repository" "repos_cfg_dir") export EESSI_REPOS_CFG_DIR_OVERRIDE=${EESSI_REPOS_CFG_DIR_OVERRIDE:-${PWD}/cfg} echo "bot/inspect.sh: EESSI_REPOS_CFG_DIR_OVERRIDE='${EESSI_REPOS_CFG_DIR_OVERRIDE}'" From 9fb5db25f3e7ce8e2d267a25f225b72911d08794 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Mon, 21 Aug 2023 10:49:23 +0200 Subject: [PATCH 05/40] simply run startprefix --- bot/inspect.sh | 106 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 72 insertions(+), 34 deletions(-) diff --git a/bot/inspect.sh b/bot/inspect.sh index f860169d95..9138d6e9b4 100755 --- a/bot/inspect.sh +++ b/bot/inspect.sh @@ -203,42 +203,80 @@ export EESSI_OS_TYPE=${EESSI_OS_TYPE:-linux} echo "bot/inspect.sh: EESSI_OS_TYPE='${EESSI_OS_TYPE}'" # prepare arguments to eessi_container.sh common to build and tarball steps -declare -a COMMON_ARGS=() -COMMON_ARGS+=("--verbose") -COMMON_ARGS+=("--access" "rw") -COMMON_ARGS+=("--mode" "run") -[[ ! -z ${CONTAINER} ]] && COMMON_ARGS+=("--container" "${CONTAINER}") -[[ ! -z ${HTTP_PROXY} ]] && COMMON_ARGS+=("--http-proxy" "${HTTP_PROXY}") -[[ ! -z ${HTTPS_PROXY} ]] && COMMON_ARGS+=("--https-proxy" "${HTTPS_PROXY}") -[[ ! -z ${REPOSITORY} ]] && COMMON_ARGS+=("--repository" "${REPOSITORY}") - -# make sure to use the same parent dir for storing tarballs of tmp -PREVIOUS_TMP_DIR=${PWD}/previous_tmp - -# prepare directory to store tarball of tmp for build step -TARBALL_TMP_BUILD_STEP_DIR=${PREVIOUS_TMP_DIR}/build_step -mkdir -p ${TARBALL_TMP_BUILD_STEP_DIR} - -# prepare arguments to eessi_container.sh specific to build step -declare -a BUILD_STEP_ARGS=() -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) -declare -a INSTALL_SCRIPT_ARGS=() -if [[ ${EESSI_SOFTWARE_SUBDIR_OVERRIDE} =~ .*/generic$ ]]; then - INSTALL_SCRIPT_ARGS+=("--generic") +declare -a CMDLINE_ARGS=() +CMDLINE_ARGS+=("--verbose") +CMDLINE_ARGS+=("--access" "rw") +CMDLINE_ARGS+=("--mode" "shell") +[[ ! -z ${CONTAINER} ]] && CMDLINE_ARGS+=("--container" "${CONTAINER}") +[[ ! -z ${HTTP_PROXY} ]] && CMDLINE_ARGS+=("--http-proxy" "${HTTP_PROXY}") +[[ ! -z ${HTTPS_PROXY} ]] && CMDLINE_ARGS+=("--https-proxy" "${HTTPS_PROXY}") +[[ ! -z ${REPOSITORY} ]] && CMDLINE_ARGS+=("--repository" "${REPOSITORY}") + +# create a directory for creating a tarball of the tmp directory +INSPECT_TMP_DIR=$(mktemp -d ${PWD}/inspect.XXX) + +# add arguments for temporary storage and storing a tarball of tmp +CMDLINE_ARGS+=("--save" "${INSPECT_TMP_DIR}") +CMDLINE_ARGS+=("--storage" "${STORAGE}") + +# # prepare arguments to install_software_layer.sh (specific to build step) +# declare -a INSTALL_SCRIPT_ARGS=() +# if [[ ${EESSI_SOFTWARE_SUBDIR_OVERRIDE} =~ .*/generic$ ]]; then +# INSTALL_SCRIPT_ARGS+=("--generic") +# fi +# [[ ! -z ${BUILD_LOGS_DIR} ]] && INSTALL_SCRIPT_ARGS+=("--build-logs-dir" "${BUILD_LOGS_DIR}") + +# make sure some environment settings are available inside the shell started via +# startprefix +base_dir=$(dirname $(realpath $0)) +source ${base_dir}/init/eessi_defaults + +if [ -z $EESSI_PILOT_VERSION ]; then + echo "ERROR: \$EESSI_PILOT_VERSION must be set!" >&2 + exit 1 +fi +EESSI_COMPAT_LAYER_DIR="${EESSI_CVMFS_REPO}/versions/${EESSI_PILOT_VERSION}/compat/linux/$(uname -m)" + +# NOTE The below requires access to the CVMFS repository. We could make a first +# test run with a container. For now we skip the test. +# if [ ! -d ${EESSI_COMPAT_LAYER_DIR} ]; then +# echo "ERROR: ${EESSI_COMPAT_LAYER_DIR} does not exist!" >&2 +# exit 1 +# fi + +# When we want to run a script with arguments, the next line is ensures to retain +# these arguments. +# 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 +if [ ! -z ${EESSI_CVMFS_REPO_OVERRIDE} ]; then + INPUT="export EESSI_CVMFS_REPO_OVERRIDE=${EESSI_CVMFS_REPO_OVERRIDE}; ${INPUT}" +fi +if [ ! -z ${EESSI_PILOT_VERSION_OVERRIDE} ]; then + INPUT="export EESSI_PILOT_VERSION_OVERRIDE=${EESSI_PILOT_VERSION_OVERRIDE}; ${INPUT}" +fi +if [ ! -z ${http_proxy} ]; then + INPUT="export http_proxy=${http_proxy}; ${INPUT}" +fi +if [ ! -z ${https_proxy} ]; then + INPUT="export https_proxy=${https_proxy}; ${INPUT}" 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 \"${INSTALL_SCRIPT_ARGS[@]}\" \"$@\" 2>&1 | tee -a ${build_outerr}" -#./eessi_container.sh "${COMMON_ARGS[@]}" "${BUILD_STEP_ARGS[@]}" \ -# -- ./install_software_layer.sh "${INSTALL_SCRIPT_ARGS[@]}" "$@" 2>&1 | tee -a ${build_outerr} +echo "Executing command to start interactive session to inspect build job:" +# TODO possibly add information on how to init session after the prefix is +# entered, initialization consists of +# - environment variable settings (see 'run_in_compat_layer_env.sh') +# - setup steps run in 'EESSI-pilot-install-software.sh' +# These initializations are combined into a single script that is executed when +# the shell in startprefix is started. We set the env variable BASH_ENV here. +echo "./eessi_container.sh ${CMDLINE_ARGS[@]}" +echo " -- ${EESSI_COMPAT_LAYER_DIR}/startprefix" +./eessi_container.sh "${CMDLINE_ARGS[@]}" \ + -- ${EESSI_COMPAT_LAYER_DIR}/startprefix exit 0 From e02c02475884ca87a5ebad32a7e7134e5a4f3475 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Mon, 21 Aug 2023 11:12:17 +0200 Subject: [PATCH 06/40] fix path to access eessi_defaults --- bot/inspect.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/inspect.sh b/bot/inspect.sh index 9138d6e9b4..f303724d5f 100755 --- a/bot/inspect.sh +++ b/bot/inspect.sh @@ -229,7 +229,8 @@ CMDLINE_ARGS+=("--storage" "${STORAGE}") # make sure some environment settings are available inside the shell started via # startprefix base_dir=$(dirname $(realpath $0)) -source ${base_dir}/init/eessi_defaults +# base_dir of inspect.sh script is '.../bot', 'init' dir is at the same level +source ${base_dir}/../init/eessi_defaults if [ -z $EESSI_PILOT_VERSION ]; then echo "ERROR: \$EESSI_PILOT_VERSION must be set!" >&2 From df5fbf09c18948faefcdf7cab26e7bb35ceae688 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Tue, 22 Aug 2023 14:52:01 +0200 Subject: [PATCH 07/40] tweaks after testing to enter prefix --- bot/inspect.sh | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/bot/inspect.sh b/bot/inspect.sh index f303724d5f..3416426d7d 100755 --- a/bot/inspect.sh +++ b/bot/inspect.sh @@ -30,12 +30,15 @@ set -e display_help() { echo "usage: $0 [OPTIONS]" echo " -h | --help - display this usage information" - echo " -j | --job-dir DIR - inspect job with the given work directory DIR" + echo " -r | --resume TGZ - inspect job saved in tarball path TGZ; note, we assume the path" + echo " to be something like JOB_DIR/previous_tmp/{build,tarball}_step/TARBALL.tgz" + echo " and thus determine JOB_DIR from the given path" + echo " [default: none]" 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" } -job_dir= +resume_tgz= http_proxy= https_proxy= @@ -47,8 +50,8 @@ while [[ $# -gt 0 ]]; do display_help exit 0 ;; - -j|--job-dir) - export job_dir="${2}" + -r|--resume) + export resume_tgz="${2}" shift 2 ;; -x|--http-proxy) @@ -76,12 +79,21 @@ set -- "${POSITIONAL_ARGS[@]}" source scripts/utils.sh source scripts/cfg_files.sh -if [[ -z ${job_dir} ]]; then - echo_yellow "path to job directory missing" +if [[ -z ${resume_tgz} ]]; then + echo_red "path to tarball for resuming build job is missing" display_help exit 1 fi +job_dir=$(dirname $(dirname $(dirname ${resume_tgz}))) + +if [[ -z ${job_dir} ]]; then + # job directory could be determined + echo_red "job directory could not be determined from '${resume_tgz}'" + display_help + exit 2 +fi + # defaults export JOB_CFG_FILE="${job_dir}/cfg/job.cfg" HOST_ARCH=$(uname -m) @@ -151,7 +163,9 @@ echo "bot/inspect.sh: LOAD_MODULES='${LOAD_MODULES}'" # singularity/apptainer settings: CONTAINER, HOME, TMPDIR, BIND CONTAINER=$(cfg_get_value "repository" "container") echo "bot/inspect.sh: CONTAINER='${CONTAINER}'" -export SINGULARITY_HOME="${PWD}:/eessi_bot_job" +# instead of using ${PWD} as HOME in the container, we use the job directory +# to have access to output files of the job +export SINGULARITY_HOME="${job_dir}:/eessi_bot_job" echo "bot/inspect.sh: SINGULARITY_HOME='${SINGULARITY_HOME}'" export SINGULARITY_TMPDIR="${PWD}/singularity_tmpdir" echo "bot/inspect.sh: SINGULARITY_TMPDIR='${SINGULARITY_TMPDIR}'" @@ -171,6 +185,7 @@ fi # determine repository to be used from entry .repository in ${JOB_CFG_FILE} REPOSITORY=$(cfg_get_value "repository" "repo_id") echo "bot/inspect.sh: REPOSITORY='${REPOSITORY}'" +# TODO better to read this from tarball??? EESSI_REPOS_CFG_DIR_OVERRIDE=$(cfg_get_value "repository" "repos_cfg_dir") export EESSI_REPOS_CFG_DIR_OVERRIDE=${EESSI_REPOS_CFG_DIR_OVERRIDE:-${PWD}/cfg} echo "bot/inspect.sh: EESSI_REPOS_CFG_DIR_OVERRIDE='${EESSI_REPOS_CFG_DIR_OVERRIDE}'" @@ -185,7 +200,7 @@ echo "bot/inspect.sh: EESSI_PILOT_VERSION_OVERRIDE='${EESSI_PILOT_VERSION_OVERRI # determine CVMFS repo to be used from .repository.repo_name in ${JOB_CFG_FILE} # here, just set EESSI_CVMFS_REPO_OVERRIDE, a bit further down # "source init/eessi_defaults" via sourcing init/minimal_eessi_env -export EESSI_CVMFS_REPO_OVERRIDE=$(cfg_get_value "repository" "repo_name") +export EESSI_CVMFS_REPO_OVERRIDE="/cvmfs/$(cfg_get_value 'repository' 'repo_name')" echo "bot/inspect.sh: EESSI_CVMFS_REPO_OVERRIDE='${EESSI_CVMFS_REPO_OVERRIDE}'" # determine architecture to be used from entry .architecture in ${JOB_CFG_FILE} @@ -206,12 +221,14 @@ echo "bot/inspect.sh: EESSI_OS_TYPE='${EESSI_OS_TYPE}'" declare -a CMDLINE_ARGS=() CMDLINE_ARGS+=("--verbose") CMDLINE_ARGS+=("--access" "rw") -CMDLINE_ARGS+=("--mode" "shell") +CMDLINE_ARGS+=("--mode" "run") [[ ! -z ${CONTAINER} ]] && CMDLINE_ARGS+=("--container" "${CONTAINER}") [[ ! -z ${HTTP_PROXY} ]] && CMDLINE_ARGS+=("--http-proxy" "${HTTP_PROXY}") [[ ! -z ${HTTPS_PROXY} ]] && CMDLINE_ARGS+=("--https-proxy" "${HTTPS_PROXY}") [[ ! -z ${REPOSITORY} ]] && CMDLINE_ARGS+=("--repository" "${REPOSITORY}") +[[ ! -z ${resume_tgz} ]] && CMDLINE_ARGS+=("--resume" "${resume_tgz}") + # create a directory for creating a tarball of the tmp directory INSPECT_TMP_DIR=$(mktemp -d ${PWD}/inspect.XXX) @@ -230,6 +247,7 @@ CMDLINE_ARGS+=("--storage" "${STORAGE}") # startprefix base_dir=$(dirname $(realpath $0)) # base_dir of inspect.sh script is '.../bot', 'init' dir is at the same level +# TODO better use script from tarball??? source ${base_dir}/../init/eessi_defaults if [ -z $EESSI_PILOT_VERSION ]; then From 45dac8b254e2fd3d0c738f630de9a997f8f86ad5 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Thu, 24 Aug 2023 15:16:19 +0200 Subject: [PATCH 08/40] initializing bot build environment settings incl EasyBuild + information note --- bot/inspect.sh | 149 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 139 insertions(+), 10 deletions(-) diff --git a/bot/inspect.sh b/bot/inspect.sh index 3416426d7d..e5e4df5970 100755 --- a/bot/inspect.sh +++ b/bot/inspect.sh @@ -229,12 +229,17 @@ CMDLINE_ARGS+=("--mode" "run") [[ ! -z ${resume_tgz} ]] && CMDLINE_ARGS+=("--resume" "${resume_tgz}") -# create a directory for creating a tarball of the tmp directory -INSPECT_TMP_DIR=$(mktemp -d ${PWD}/inspect.XXX) +# create a directory for creating temporary data and scripts for the inspection +INSPECT_DIR=$(mktemp --directory --tmpdir=${PWD} inspect.XXX) +if [[ -z ${SINGULARITY_BIND} ]]; then + export SINGULARITY_BIND="${INSPECT_DIR}:/inspect_eessi_build_job" +else + export SINGULARITY_BIND="${SINGULARITY_BIND},${INSPECT_DIR}:/inspect_eessi_build_job" +fi # add arguments for temporary storage and storing a tarball of tmp -CMDLINE_ARGS+=("--save" "${INSPECT_TMP_DIR}") -CMDLINE_ARGS+=("--storage" "${STORAGE}") +CMDLINE_ARGS+=("--save" "${INSPECT_DIR}") +CMDLINE_ARGS+=("--storage" "${JOB_STORAGE}") # # prepare arguments to install_software_layer.sh (specific to build step) # declare -a INSTALL_SCRIPT_ARGS=() @@ -266,23 +271,147 @@ EESSI_COMPAT_LAYER_DIR="${EESSI_CVMFS_REPO}/versions/${EESSI_PILOT_VERSION}/comp # When we want to run a script with arguments, the next line is ensures to retain # these arguments. # INPUT=$(echo "$@") +mkdir -p ${INSPECT_DIR}/scripts +RESUME_SCRIPT=${INSPECT_DIR}/scripts/resume_env.sh +echo "bot/inspect.sh: creating script '${RESUME_SCRIPT}' to resume environment settings" + +cat << EOF > ${RESUME_SCRIPT} +#!${EESSI_COMPAT_LAYER_DIR}/bin/bash +echo "Sourcing '\$BASH_SOURCE' to init bot environment of build job" +EOF if [ ! -z ${SLURM_JOB_ID} ]; then - INPUT="export SLURM_JOB_ID=${SLURM_JOB_ID}; ${INPUT}" + # TODO do we need the value at all? if so which one: current or of the job to + # inspect? + echo "export CURRENT_SLURM_JOB_ID=${SLURM_JOB_ID}" >> ${RESUME_SCRIPT} fi if [ ! -z ${EESSI_SOFTWARE_SUBDIR_OVERRIDE} ]; then - INPUT="export EESSI_SOFTWARE_SUBDIR_OVERRIDE=${EESSI_SOFTWARE_SUBDIR_OVERRIDE}; ${INPUT}" + echo "export EESSI_SOFTWARE_SUBDIR_OVERRIDE=${EESSI_SOFTWARE_SUBDIR_OVERRIDE}" >> ${RESUME_SCRIPT} fi if [ ! -z ${EESSI_CVMFS_REPO_OVERRIDE} ]; then - INPUT="export EESSI_CVMFS_REPO_OVERRIDE=${EESSI_CVMFS_REPO_OVERRIDE}; ${INPUT}" + echo "export EESSI_CVMFS_REPO_OVERRIDE=${EESSI_CVMFS_REPO_OVERRIDE}" >> ${RESUME_SCRIPT} fi if [ ! -z ${EESSI_PILOT_VERSION_OVERRIDE} ]; then - INPUT="export EESSI_PILOT_VERSION_OVERRIDE=${EESSI_PILOT_VERSION_OVERRIDE}; ${INPUT}" + echo "export EESSI_PILOT_VERSION_OVERRIDE=${EESSI_PILOT_VERSION_OVERRIDE}" >> ${RESUME_SCRIPT} fi if [ ! -z ${http_proxy} ]; then - INPUT="export http_proxy=${http_proxy}; ${INPUT}" + echo "export http_proxy=${http_proxy}" >> ${RESUME_SCRIPT} fi if [ ! -z ${https_proxy} ]; then - INPUT="export https_proxy=${https_proxy}; ${INPUT}" + echo "export https_proxy=${https_proxy}" >> ${RESUME_SCRIPT} +fi +cat << 'EOF' >> ${RESUME_SCRIPT} +TOPDIR=$(dirname $(realpath $BASH_SOURCE)) + +source ${TOPDIR}/scripts/utils.sh + +# honor $TMPDIR if it is already defined, use /tmp otherwise +if [ -z $TMPDIR ]; then + export WORKDIR=/tmp/$USER +else + export WORKDIR=$TMPDIR/$USER +fi + +TMPDIR=$(mktemp -d) + +echo ">> Setting up environment..." + +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 + +# make sure we're in Prefix environment by checking $SHELL +if [[ ${SHELL} = ${EPREFIX}/bin/bash ]]; then + echo_green ">> It looks like we're in a Gentoo Prefix environment, good!" +else + fatal_error "Not running in Gentoo Prefix environment, run '${EPREFIX}/startprefix' first!" +fi + +# avoid that pyc files for EasyBuild are stored in EasyBuild installation directory +export PYTHONPYCACHEPREFIX=$TMPDIR/pycache + +DETECTION_PARAMETERS='' +GENERIC=0 +EB='eb' +if [[ "$EASYBUILD_OPTARCH" == "GENERIC" || "$EESSI_SOFTWARE_SUBDIR_OVERRIDE" == *"/generic" ]]; then + echo_yellow ">> GENERIC build requested, taking appropriate measures!" + DETECTION_PARAMETERS="$DETECTION_PARAMETERS --generic" + GENERIC=1 + export EASYBUILD_OPTARCH=GENERIC + EB='eb --optarch=GENERIC' +fi + +echo ">> Determining software subdirectory to use for current build host..." +if [ -z $EESSI_SOFTWARE_SUBDIR_OVERRIDE ]; then + export EESSI_SOFTWARE_SUBDIR_OVERRIDE=$(python3 $TOPDIR/eessi_software_subdir.py $DETECTION_PARAMETERS) + echo ">> Determined \$EESSI_SOFTWARE_SUBDIR_OVERRIDE via 'eessi_software_subdir.py $DETECTION_PARAMETERS' script" +else + echo ">> Picking up pre-defined \$EESSI_SOFTWARE_SUBDIR_OVERRIDE: ${EESSI_SOFTWARE_SUBDIR_OVERRIDE}" +fi + +# 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 + +if [[ -z ${EESSI_SOFTWARE_SUBDIR} ]]; then + fatal_error "Failed to determine software subdirectory?!" +elif [[ "${EESSI_SOFTWARE_SUBDIR}" != "${EESSI_SOFTWARE_SUBDIR_OVERRIDE}" ]]; then + fatal_error "Values for EESSI_SOFTWARE_SUBDIR_OVERRIDE (${EESSI_SOFTWARE_SUBDIR_OVERRIDE}) and EESSI_SOFTWARE_SUBDIR (${EESSI_SOFTWARE_SUBDIR}) differ!" +else + echo_green ">> Using ${EESSI_SOFTWARE_SUBDIR} as software subdirectory!" +fi + +echo ">> Initializing Lmod..." +source $EPREFIX/usr/share/Lmod/init/bash +ml_version_out=$TMPDIR/ml.out +ml --version &> $ml_version_out +if [[ $? -eq 0 ]]; then + echo_green ">> Found Lmod ${LMOD_VERSION}" +else + fatal_error "Failed to initialize Lmod?! (see output in ${ml_version_out}" +fi + +echo ">> Configuring EasyBuild..." +source $TOPDIR/configure_easybuild + +echo ">> Setting up \$MODULEPATH..." +# make sure no modules are loaded +module --force purge +# ignore current $MODULEPATH entirely +module unuse $MODULEPATH +module use $EASYBUILD_INSTALLPATH/modules/all +if [[ -z ${MODULEPATH} ]]; then + fatal_error "Failed to set up \$MODULEPATH?!" +else + echo_green ">> MODULEPATH set up: ${MODULEPATH}" +fi + +eb_version='4.7.2' + +# load EasyBuild module (will be installed if it's not available yet) +source ${TOPDIR}/load_easybuild_module.sh ${eb_version} + +echo_green "All set, let's start installing some software with EasyBuild v${eb_version} in ${EASYBUILD_INSTALLPATH}..." + +echo "Ready for inspection of build job:" +echo " - job directory is $HOME (\$HOME), check for slurm-*.out file" +echo " - temporary data of job available at /tmp" +echo " - Note, prefix $EESSI_PREFIX is writable" +echo " - EasyBuild v${eb_version} is available" + +EOF +chmod u+x ${RESUME_SCRIPT} + +# try to map it into the container's $HOME/.profile instead +# TODO check if script already exists, if so change its name and source it at the beginning of the RESUME_SCRIPT +if [[ -z ${SINGULARITY_BIND} ]]; then + export SINGULARITY_BIND="${RESUME_SCRIPT}:/eessi_bot_job/.profile" +else + export SINGULARITY_BIND="${SINGULARITY_BIND},${RESUME_SCRIPT}:/eessi_bot_job/.profile" fi echo "Executing command to start interactive session to inspect build job:" From 515c0ad8896ca68d87d7eb84c796c33cd3003281 Mon Sep 17 00:00:00 2001 From: Maxim Masterov Date: Mon, 11 Sep 2023 14:13:09 +0200 Subject: [PATCH 09/40] Add espresso with GCC/11.3.0 and without CUDA to EESSI pilot 2023.06 --- eessi-2023.06-eb-4.7.2-2022a.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eessi-2023.06-eb-4.7.2-2022a.yml b/eessi-2023.06-eb-4.7.2-2022a.yml index d40ddff261..f690d49192 100644 --- a/eessi-2023.06-eb-4.7.2-2022a.yml +++ b/eessi-2023.06-eb-4.7.2-2022a.yml @@ -1,3 +1,6 @@ easyconfigs: - GCC-11.3.0 - OpenMPI-4.1.4-GCC-11.3.0.eb + - ESPResSo-4.2.1-foss-2022a.eb: + options: + from-pr: 18486 From b3e6b8acddd5c4afcb453d31b00115a7a007338e Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 26 Sep 2023 10:03:15 +0200 Subject: [PATCH 10/40] Add the option to pass a command to the inspect script, which will get executed in the container. Useful if you want to e.g. run this in a job, but just submit that job manually (not by the bot). --- bot/inspect.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/bot/inspect.sh b/bot/inspect.sh index e5e4df5970..a97a29b614 100755 --- a/bot/inspect.sh +++ b/bot/inspect.sh @@ -34,6 +34,7 @@ display_help() { echo " to be something like JOB_DIR/previous_tmp/{build,tarball}_step/TARBALL.tgz" echo " and thus determine JOB_DIR from the given path" echo " [default: none]" + echo " -c | --command COMMAND - command to execute inside the container, in the prefix environment" 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" } @@ -62,6 +63,10 @@ while [[ $# -gt 0 ]]; do export https_proxy="${2}" shift 2 ;; + -c|--command) + export run_in_prefix="${2}" + shift 2 + ;; -*|--*) echo "Error: Unknown option: ${1}" >&2 exit 1 @@ -421,10 +426,16 @@ echo "Executing command to start interactive session to inspect build job:" # - setup steps run in 'EESSI-pilot-install-software.sh' # These initializations are combined into a single script that is executed when # the shell in startprefix is started. We set the env variable BASH_ENV here. -echo "./eessi_container.sh ${CMDLINE_ARGS[@]}" -echo " -- ${EESSI_COMPAT_LAYER_DIR}/startprefix" -./eessi_container.sh "${CMDLINE_ARGS[@]}" \ +if [[ -z ${run_in_prefix} ]]; then + echo "./eessi_container.sh ${CMDLINE_ARGS[@]}" + echo " -- ${EESSI_COMPAT_LAYER_DIR}/startprefix" + ./eessi_container.sh "${CMDLINE_ARGS[@]}" \ -- ${EESSI_COMPAT_LAYER_DIR}/startprefix - +else + echo "./eessi_container.sh ${CMDLINE_ARGS[@]}" + echo " -- ${EESSI_COMPAT_LAYER_DIR}/startprefix <<< ${run_in_prefix}" + ./eessi_container.sh "${CMDLINE_ARGS[@]}" \ + -- ${EESSI_COMPAT_LAYER_DIR}/startprefix <<< ${run_in_prefix} +fi exit 0 From 8e4c6b230e285f43e4d4a40b6a28f8ce16691396 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Tue, 26 Sep 2023 13:16:00 +0200 Subject: [PATCH 11/40] do not load EasyBuild module, rather provide instructions to load it --- bot/inspect.sh | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/bot/inspect.sh b/bot/inspect.sh index a97a29b614..b6d633744f 100755 --- a/bot/inspect.sh +++ b/bot/inspect.sh @@ -395,18 +395,22 @@ else echo_green ">> MODULEPATH set up: ${MODULEPATH}" fi -eb_version='4.7.2' - -# load EasyBuild module (will be installed if it's not available yet) -source ${TOPDIR}/load_easybuild_module.sh ${eb_version} - -echo_green "All set, let's start installing some software with EasyBuild v${eb_version} in ${EASYBUILD_INSTALLPATH}..." - -echo "Ready for inspection of build job:" +echo_green "Build environment set up with install path ${EASYBUILD_INSTALLPATH}." +echo +echo "The build job can be inspected with the following resources:" echo " - job directory is $HOME (\$HOME), check for slurm-*.out file" -echo " - temporary data of job available at /tmp" -echo " - Note, prefix $EESSI_PREFIX is writable" -echo " - EasyBuild v${eb_version} is available" +echo " - temporary data of the job is available at /tmp" +echo " - note, the prefix $EESSI_PREFIX is writable" +echo +echo "You may want to load an EasyBuild module. The inspect.sh script does not load" +echo "that automatically, because multiple versions might have been used by the job." +echo "Choose an EasyBuild version (see installed versions with 'module avail')" +echo "and run" +echo +echo "source ${TOPDIR}/load_easybuild_module.sh EasyBuild_version" +echo +echo "Note, if you choose a version that is not installed yet, it will be" +echo "installed first." EOF chmod u+x ${RESUME_SCRIPT} From eb29516eabaf54cb867eb6e331bab94516264061 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Tue, 26 Sep 2023 13:56:15 +0200 Subject: [PATCH 12/40] tweaking of instructions for setting up EasyBuild --- bot/inspect.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bot/inspect.sh b/bot/inspect.sh index b6d633744f..d35f11cf35 100755 --- a/bot/inspect.sh +++ b/bot/inspect.sh @@ -404,13 +404,20 @@ echo " - note, the prefix $EESSI_PREFIX is writable" echo echo "You may want to load an EasyBuild module. The inspect.sh script does not load" echo "that automatically, because multiple versions might have been used by the job." -echo "Choose an EasyBuild version (see installed versions with 'module avail')" +echo "Choose an EasyBuild version (see installed versions with 'module avail EasyBuild')" echo "and run" echo -echo "source ${TOPDIR}/load_easybuild_module.sh EasyBuild_version" +echo "source ${TOPDIR}/load_easybuild_module.sh _EasyBuild_version_" +echo +echo "Replace _EasyBuild_version_ with the version you want to use." echo echo "Note, if you choose a version that is not installed yet, it will be" echo "installed first." +echo +echo "If the version you need is already listed with 'module avail', you can" +echo "simply run" +echo +echo "module load EasyBuild/VERSION_YOU_NEED" EOF chmod u+x ${RESUME_SCRIPT} From eb113c2dae51cada092fd32d849e4b709f43cb26 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Tue, 26 Sep 2023 14:03:45 +0200 Subject: [PATCH 13/40] minor tweaking --- bot/inspect.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bot/inspect.sh b/bot/inspect.sh index d35f11cf35..5b89705019 100755 --- a/bot/inspect.sh +++ b/bot/inspect.sh @@ -395,6 +395,7 @@ else echo_green ">> MODULEPATH set up: ${MODULEPATH}" fi +echo echo_green "Build environment set up with install path ${EASYBUILD_INSTALLPATH}." echo echo "The build job can be inspected with the following resources:" From 2333240285bdd82c95a69bf2f0126b43958aa2c8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 28 Sep 2023 13:57:40 +0200 Subject: [PATCH 14/40] install ESPResSo-4.2.1-foss-2022a with EasyBuild v4.8.1 --- eessi-2023.06-eb-4.7.2-2022a.yml | 3 --- eessi-2023.06-eb-4.8.1-2022a.yml | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/eessi-2023.06-eb-4.7.2-2022a.yml b/eessi-2023.06-eb-4.7.2-2022a.yml index f690d49192..d40ddff261 100644 --- a/eessi-2023.06-eb-4.7.2-2022a.yml +++ b/eessi-2023.06-eb-4.7.2-2022a.yml @@ -1,6 +1,3 @@ easyconfigs: - GCC-11.3.0 - OpenMPI-4.1.4-GCC-11.3.0.eb - - ESPResSo-4.2.1-foss-2022a.eb: - options: - from-pr: 18486 diff --git a/eessi-2023.06-eb-4.8.1-2022a.yml b/eessi-2023.06-eb-4.8.1-2022a.yml index 8de4c6169d..c05316bcf7 100644 --- a/eessi-2023.06-eb-4.8.1-2022a.yml +++ b/eessi-2023.06-eb-4.8.1-2022a.yml @@ -5,3 +5,4 @@ easyconfigs: options: from-pr: 18870 - foss-2022a + - ESPResSo-4.2.1-foss-2022a From dd6c4c0f126fc2572378dc1eb6d34a03decbf47d Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Fri, 29 Sep 2023 19:50:48 +0200 Subject: [PATCH 15/40] change the instructions to simply use module load for getting access to EasyBuild --- bot/inspect.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/bot/inspect.sh b/bot/inspect.sh index 5b89705019..637eaea97f 100755 --- a/bot/inspect.sh +++ b/bot/inspect.sh @@ -406,19 +406,16 @@ echo echo "You may want to load an EasyBuild module. The inspect.sh script does not load" echo "that automatically, because multiple versions might have been used by the job." echo "Choose an EasyBuild version (see installed versions with 'module avail EasyBuild')" -echo "and run" +echo "and simply run" echo -echo "source ${TOPDIR}/load_easybuild_module.sh _EasyBuild_version_" +echo "module load EasyBuild/_VERSION_" echo -echo "Replace _EasyBuild_version_ with the version you want to use." +echo "Replace _VERSION_ with the version you want to use." echo -echo "Note, if you choose a version that is not installed yet, it will be" -echo "installed first." +echo "Note, you can try to install a newer version with 'eb'. The script" +echo "load_easybuild_module.sh cannot be used currently, because it exits at" +echo "the end which also leaves the container." echo -echo "If the version you need is already listed with 'module avail', you can" -echo "simply run" -echo -echo "module load EasyBuild/VERSION_YOU_NEED" EOF chmod u+x ${RESUME_SCRIPT} From 470a22109d96762e9603739f7fda8152a1ad5dcf Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Fri, 29 Sep 2023 21:17:31 +0200 Subject: [PATCH 16/40] remove note about installing a new EasyBuild --- bot/inspect.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bot/inspect.sh b/bot/inspect.sh index 637eaea97f..a3b88e5017 100755 --- a/bot/inspect.sh +++ b/bot/inspect.sh @@ -412,10 +412,6 @@ echo "module load EasyBuild/_VERSION_" echo echo "Replace _VERSION_ with the version you want to use." echo -echo "Note, you can try to install a newer version with 'eb'. The script" -echo "load_easybuild_module.sh cannot be used currently, because it exits at" -echo "the end which also leaves the container." -echo EOF chmod u+x ${RESUME_SCRIPT} From afcd92dff998e039ad8a2d7e5682604f6b1f7ad2 Mon Sep 17 00:00:00 2001 From: Maxim Date: Tue, 10 Oct 2023 11:40:26 +0200 Subject: [PATCH 17/40] Update eessi-2023.06-eb-4.8.1-2022a.yml --- eessi-2023.06-eb-4.8.1-2022a.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eessi-2023.06-eb-4.8.1-2022a.yml b/eessi-2023.06-eb-4.8.1-2022a.yml index c05316bcf7..646f28533d 100644 --- a/eessi-2023.06-eb-4.8.1-2022a.yml +++ b/eessi-2023.06-eb-4.8.1-2022a.yml @@ -6,3 +6,5 @@ easyconfigs: from-pr: 18870 - foss-2022a - ESPResSo-4.2.1-foss-2022a + options: + from-pr: 18963 From d877d7076790e2bd671604df36f2016ac86cbe09 Mon Sep 17 00:00:00 2001 From: maxim-masterov Date: Tue, 10 Oct 2023 11:53:12 +0200 Subject: [PATCH 18/40] Add missing colon --- eessi-2023.06-eb-4.8.1-2022a.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eessi-2023.06-eb-4.8.1-2022a.yml b/eessi-2023.06-eb-4.8.1-2022a.yml index 3c27495cd1..c9a249872b 100644 --- a/eessi-2023.06-eb-4.8.1-2022a.yml +++ b/eessi-2023.06-eb-4.8.1-2022a.yml @@ -5,7 +5,7 @@ easyconfigs: options: from-pr: 18870 - foss-2022a - - ESPResSo-4.2.1-foss-2022a + - ESPResSo-4.2.1-foss-2022a: options: from-pr: 18963 - SciPy-bundle-2022.05-foss-2022a From f8b4f42baa9451a2f5fa50d28fdc009e875d414b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 10 Oct 2023 16:47:56 +0200 Subject: [PATCH 19/40] add ESPResSo to end of easystack file to preserve installation order --- eessi-2023.06-eb-4.8.1-2022a.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eessi-2023.06-eb-4.8.1-2022a.yml b/eessi-2023.06-eb-4.8.1-2022a.yml index c9a249872b..8317a40b7a 100644 --- a/eessi-2023.06-eb-4.8.1-2022a.yml +++ b/eessi-2023.06-eb-4.8.1-2022a.yml @@ -5,8 +5,8 @@ easyconfigs: options: from-pr: 18870 - foss-2022a + - SciPy-bundle-2022.05-foss-2022a + - BAMM-2.5.0-foss-2022a.eb - ESPResSo-4.2.1-foss-2022a: options: from-pr: 18963 - - SciPy-bundle-2022.05-foss-2022a - - BAMM-2.5.0-foss-2022a.eb From eae083ff82f540f056c4e7a3a732133d8813314c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 11 Oct 2023 08:58:40 +0200 Subject: [PATCH 20/40] add hook to ignore failing tests in ESPResSo v4.2.1 + add corresponding tracker issue to list of known issues --- eb_hooks.py | 35 +++++++++++++++++++++++----------- eessi-2023.06-known-issues.yml | 24 +++++++++++++++-------- 2 files changed, 40 insertions(+), 19 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index dbb8415541..31f2b9588d 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -247,6 +247,7 @@ def pre_configure_hook_metabat_filtered_zlib_dep(self, *args, **kwargs): else: raise EasyBuildError("MetaBAT-specific hook triggered for non-MetaBAT easyconfig?!") + def pre_configure_hook_wrf_aarch64(self, *args, **kwargs): """ Pre-configure hook for WRF: @@ -266,11 +267,32 @@ 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_ESPResSo(self, *args, **kwargs): + """ + Pre-test hook for ESPResSo: skip failing tests, tests frequently timeout due to known bugs in ESPResSo v4.2.1 + cfr. https://github.com/EESSI/software-layer/issues/363 + """ + if self.name == 'ESPResSo' and self.version == '4.2.1': + self.cfg['testopts'] = "|| echo 'ignoring failing tests (probably due to timeouts)'" + + +def pre_test_hook_ignore_failing_tests_FFTWMPI(self, *args, **kwargs): + """ + Pre-test hook for FFTW.MPI: skip failing tests for FFTW.MPI 3.3.10 on neoverse_v1 + cfr. https://github.com/EESSI/software-layer/issues/325 + """ + cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') + if self.name == 'FFTW.MPI' and self.version == '3.3.10' and cpu_target == CPU_TARGET_NEOVERSE_V1: + self.cfg['testopts'] = "|| echo ignoring failing tests" + + 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). @@ -307,16 +329,6 @@ def pre_single_extension_isoband(ext, *args, **kwargs): ext.cfg['preinstallopts'] = "sed -i 's/SIGSTKSZ/32768/g' src/testthat/vendor/catch.h && " -def pre_test_hook_ignore_failing_tests_FFTWMPI(self, *args, **kwargs): - """ - Pre-test hook for FFTW.MPI: skip failing tests for FFTW.MPI 3.3.10 on neoverse_v1 - cfr. https://github.com/EESSI/software-layer/issues/325 - """ - cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') - if self.name == 'FFTW.MPI' and self.version == '3.3.10' and cpu_target == CPU_TARGET_NEOVERSE_V1: - self.cfg['testopts'] = "|| echo ignoring failing tests" - - PARSE_HOOKS = { 'CGAL': parse_hook_cgal_toolchainopts_precise, 'fontconfig': parse_hook_fontconfig_add_fonts, @@ -337,8 +349,9 @@ def pre_test_hook_ignore_failing_tests_FFTWMPI(self, *args, **kwargs): } PRE_TEST_HOOKS = { - 'SciPy-bundle': pre_test_hook_ignore_failing_tests_SciPybundle, + 'ESPResSo': pre_test_hook_ignore_failing_tests_ESPResSo, 'FFTW.MPI': pre_test_hook_ignore_failing_tests_FFTWMPI, + 'SciPy-bundle': pre_test_hook_ignore_failing_tests_SciPybundle, } PRE_SINGLE_EXTENSION_HOOKS = { diff --git a/eessi-2023.06-known-issues.yml b/eessi-2023.06-known-issues.yml index f2f96aee34..846e862983 100644 --- a/eessi-2023.06-known-issues.yml +++ b/eessi-2023.06-known-issues.yml @@ -1,22 +1,30 @@ +- x86_64/*: + - ESPResSo-4.2.1-foss-2022a: + - issue: https://github.com/EESSI/software-layer/issues/363 + - info: "Failing tests in ESPResSo v4.2.1 due to timeouts" +- aarch64/*: + - ESPResSo-4.2.1-foss-2022a: + - issue: https://github.com/EESSI/software-layer/issues/363 + - info: "Failing tests in ESPResSo v4.2.1 due to timeouts" - aarch64/neoverse_v1: - - FFTW/3.3.10-GCC-11.3.0: + - FFTW-3.3.10-GCC-11.3.0: - issue: https://github.com/EESSI/software-layer/issues/325 - info: "Flaky FFTW tests, random failures" - - FFTW/3.3.10-gompi-2021b: + - FFTW-3.3.10-gompi-2021b: - issue: https://github.com/EESSI/software-layer/issues/325 - info: "Flaky FFTW tests, random failures" - - OpenBLAS/0.3.18-GCC-11.2.0: + - OpenBLAS-0.3.18-GCC-11.2.0: - issue: https://github.com/EESSI/software-layer/issues/314 - info: "Increased number of non-numerical failures in OpenBLAS test suite (238 vs max. 150 on x86_64/*)" - - OpenBLAS/0.3.20-GCC-11.3.0: + - OpenBLAS-0.3.20-GCC-11.3.0: - issue: https://github.com/EESSI/software-layer/issues/314 - info: "Increased number of non-numerical failures in OpenBLAS test suite (238 vs max. 150 on x86_64/*)" - - OpenBLAS/0.3.21-GCC-12.2.0: + - OpenBLAS-0.3.21-GCC-12.2.0: - issue: https://github.com/EESSI/software-layer/issues/314 - info: "Increased number of non-numerical failures in OpenBLAS test suite (344 vs max. 150 on x86_64/*)" - - SciPy-bundle/2021.05-foss-2021a: + - SciPy-bundle-2021.05-foss-2021a: - issue: https://github.com/EESSI/software-layer/issues/318 - info: "2 failing tests (vs 30554 passed) in scipy test suite" - - SciPy-bundle/2021.10-foss-2021b: + - SciPy-bundle-2021.10-foss-2021b: - issue: https://github.com/EESSI/software-layer/issues/318 - - info: "20 failing tests (vs 14429 passed) in numpy test suite + 55 failing tests (vs 32438 passed) in scipy test suite" + - info: "20 ailing tests (vs 14429 passed) in numpy test suite + 55 failing tests (vs 32438 passed) in scipy test suite" From 8779e8b350bf2379a36b7671d150fce5f2f8a262 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 11 Oct 2023 12:44:30 +0200 Subject: [PATCH 21/40] filter out YAML files that are used to keep track of known issues and missing installations --- EESSI-pilot-install-software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-pilot-install-software.sh b/EESSI-pilot-install-software.sh index c6c51e7abc..9586abde1d 100755 --- a/EESSI-pilot-install-software.sh +++ b/EESSI-pilot-install-software.sh @@ -190,7 +190,7 @@ fi pr_diff=$(ls [0-9]*.diff | head -1) # use PR patch file to determine in which easystack files stuff was added -for easystack_file in $(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep '^eessi.*yml$'); do +for easystack_file in $(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep '^eessi.*yml$' | egrep -v 'known-issues|missing'); do echo -e "Processing easystack file ${easystack_file}...\n\n" From cd5cea918c26e67174f278df80a43ef9a2cff045 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 11 Oct 2023 16:30:53 +0200 Subject: [PATCH 22/40] fix missing latter in info message in list of known issues --- eessi-2023.06-known-issues.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eessi-2023.06-known-issues.yml b/eessi-2023.06-known-issues.yml index 846e862983..6cb464cd20 100644 --- a/eessi-2023.06-known-issues.yml +++ b/eessi-2023.06-known-issues.yml @@ -27,4 +27,4 @@ - info: "2 failing tests (vs 30554 passed) in scipy test suite" - SciPy-bundle-2021.10-foss-2021b: - issue: https://github.com/EESSI/software-layer/issues/318 - - info: "20 ailing tests (vs 14429 passed) in numpy test suite + 55 failing tests (vs 32438 passed) in scipy test suite" + - info: "20 failing tests (vs 14429 passed) in numpy test suite + 55 failing tests (vs 32438 passed) in scipy test suite" From ea75facab305f527b81aebff51b593255b54adb3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 11 Oct 2023 21:45:35 +0200 Subject: [PATCH 23/40] {2023.06}[2023a] X11 20230603 --- eessi-2023.06-eb-4.8.1-2023a.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eessi-2023.06-eb-4.8.1-2023a.yml b/eessi-2023.06-eb-4.8.1-2023a.yml index b015676757..c766815934 100644 --- a/eessi-2023.06-eb-4.8.1-2023a.yml +++ b/eessi-2023.06-eb-4.8.1-2023a.yml @@ -8,3 +8,4 @@ easyconfigs: options: from-pr: 18887 - foss-2023a + - X11-20230603-GCCcore-12.3.0 From e5b33b5111447bb663e2cec2ad136c79eaa09b9c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 13 Oct 2023 22:40:31 +0200 Subject: [PATCH 24/40] fix info on known issue for OpenBLAS on aarch64/neoverse_v1: increased number of *numerical* errors --- eessi-2023.06-known-issues.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eessi-2023.06-known-issues.yml b/eessi-2023.06-known-issues.yml index 6cb464cd20..ade1c069df 100644 --- a/eessi-2023.06-known-issues.yml +++ b/eessi-2023.06-known-issues.yml @@ -15,13 +15,13 @@ - info: "Flaky FFTW tests, random failures" - OpenBLAS-0.3.18-GCC-11.2.0: - issue: https://github.com/EESSI/software-layer/issues/314 - - info: "Increased number of non-numerical failures in OpenBLAS test suite (238 vs max. 150 on x86_64/*)" + - info: "Increased number of numerical errors in OpenBLAS test suite (238 vs max. 150 on x86_64/*)" - OpenBLAS-0.3.20-GCC-11.3.0: - issue: https://github.com/EESSI/software-layer/issues/314 - - info: "Increased number of non-numerical failures in OpenBLAS test suite (238 vs max. 150 on x86_64/*)" + - info: "Increased number of numerical errors in OpenBLAS test suite (238 vs max. 150 on x86_64/*)" - OpenBLAS-0.3.21-GCC-12.2.0: - issue: https://github.com/EESSI/software-layer/issues/314 - - info: "Increased number of non-numerical failures in OpenBLAS test suite (344 vs max. 150 on x86_64/*)" + - info: "Increased number of numerical errors in OpenBLAS test suite (344 vs max. 150 on x86_64/*)" - SciPy-bundle-2021.05-foss-2021a: - issue: https://github.com/EESSI/software-layer/issues/318 - info: "2 failing tests (vs 30554 passed) in scipy test suite" From 3be4823474774211581bc2dd85b5fd98e7eec746 Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Thu, 19 Oct 2023 18:42:41 +0200 Subject: [PATCH 25/40] Add DP3-6.0-foss-2022a and WSClean-3.4-foss-2022a --- eessi-2023.06-eb-4.8.1-2022a.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eessi-2023.06-eb-4.8.1-2022a.yml b/eessi-2023.06-eb-4.8.1-2022a.yml index 8317a40b7a..28b469ee24 100644 --- a/eessi-2023.06-eb-4.8.1-2022a.yml +++ b/eessi-2023.06-eb-4.8.1-2022a.yml @@ -10,3 +10,9 @@ easyconfigs: - ESPResSo-4.2.1-foss-2022a: options: from-pr: 18963 + - DP3-6.0-foss-2022a: + options: + from-pr: 19010 + - WSClean-3.4-foss-2022a: + options: + from-pr: 19010 From 207fb71f0991101edf13ebc1e51387af77087178 Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Mon, 30 Oct 2023 10:56:24 +0100 Subject: [PATCH 26/40] Add EasyBuild v4.8.2 --- eessi-2023.06-eb-4.8.0-system.yml | 3 +++ eessi-2023.06-eb-4.8.1-2022a.yml | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/eessi-2023.06-eb-4.8.0-system.yml b/eessi-2023.06-eb-4.8.0-system.yml index 2928f110b0..8db29e3c61 100644 --- a/eessi-2023.06-eb-4.8.0-system.yml +++ b/eessi-2023.06-eb-4.8.0-system.yml @@ -8,3 +8,6 @@ easyconfigs: - EasyBuild-4.8.1.eb: options: from-pr: 18761 + - EasyBuild-4.8.2.eb: + options: + from-pr: 19101 diff --git a/eessi-2023.06-eb-4.8.1-2022a.yml b/eessi-2023.06-eb-4.8.1-2022a.yml index 28b469ee24..8317a40b7a 100644 --- a/eessi-2023.06-eb-4.8.1-2022a.yml +++ b/eessi-2023.06-eb-4.8.1-2022a.yml @@ -10,9 +10,3 @@ easyconfigs: - ESPResSo-4.2.1-foss-2022a: options: from-pr: 18963 - - DP3-6.0-foss-2022a: - options: - from-pr: 19010 - - WSClean-3.4-foss-2022a: - options: - from-pr: 19010 From 10830788bdff71a15cc4a51488763b805ef2582f Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Mon, 30 Oct 2023 10:57:32 +0100 Subject: [PATCH 27/40] Add EasyBuild v4.8.2 --- eessi-2023.06-eb-4.8.2-2022a.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 eessi-2023.06-eb-4.8.2-2022a.yml diff --git a/eessi-2023.06-eb-4.8.2-2022a.yml b/eessi-2023.06-eb-4.8.2-2022a.yml new file mode 100644 index 0000000000..5e812716f2 --- /dev/null +++ b/eessi-2023.06-eb-4.8.2-2022a.yml @@ -0,0 +1,3 @@ +easyconfigs: + - DP3-6.0-foss-2022a: + - WSClean-3.4-foss-2022a: From e2644fa581b67b52acddab01285880b993e17fe0 Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Mon, 30 Oct 2023 11:23:31 +0100 Subject: [PATCH 28/40] Add EasyBuild 4.8.2 to 4.8.1 system file --- eessi-2023.06-eb-4.8.1-system.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eessi-2023.06-eb-4.8.1-system.yml b/eessi-2023.06-eb-4.8.1-system.yml index 1e9664e10f..3d0e1c3c32 100644 --- a/eessi-2023.06-eb-4.8.1-system.yml +++ b/eessi-2023.06-eb-4.8.1-system.yml @@ -4,3 +4,6 @@ easyconfigs: - ReFrame-4.3.3.eb: options: from-pr: 18851 + - EasyBuild-4.8.2.eb: + options: + from-pr: 19101 From eb503d9d73904de99ff7d2a3c7d118298ac1461f Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Mon, 30 Oct 2023 11:24:59 +0100 Subject: [PATCH 29/40] Remove EasyBuild 4.8.2 from 4.8.0 system file --- eessi-2023.06-eb-4.8.0-system.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/eessi-2023.06-eb-4.8.0-system.yml b/eessi-2023.06-eb-4.8.0-system.yml index 8db29e3c61..2928f110b0 100644 --- a/eessi-2023.06-eb-4.8.0-system.yml +++ b/eessi-2023.06-eb-4.8.0-system.yml @@ -8,6 +8,3 @@ easyconfigs: - EasyBuild-4.8.1.eb: options: from-pr: 18761 - - EasyBuild-4.8.2.eb: - options: - from-pr: 19101 From 23b23f1a86a038f5ef616799af118cb43c1a972c Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Mon, 30 Oct 2023 13:20:47 +0100 Subject: [PATCH 30/40] Try loading module without cache before exiting --- load_easybuild_module.sh | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/load_easybuild_module.sh b/load_easybuild_module.sh index 4ff2a3c37c..c027a4b4b1 100755 --- a/load_easybuild_module.sh +++ b/load_easybuild_module.sh @@ -23,14 +23,14 @@ fi EB_VERSION=${1} # make sure that environment variables that we expect to be set are indeed set -if [ -z "${TMPDIR}" ]; then +if [ -z "${TMPDIR}" ]; then echo "\$TMPDIR is not set" >&2 exit 2 fi # ${EB} is used to specify which 'eb' command should be used; # can potentially be more than just 'eb', for example when using 'eb --optarch=GENERIC' -if [ -z "${EB}" ]; then +if [ -z "${EB}" ]; then echo "\$EB is not set" >&2 exit 2 fi @@ -75,17 +75,22 @@ else if [[ $? -eq 0 ]]; then echo_green ">> Module for EasyBuild v${EB_VERSION} found!" else - eb_ec=EasyBuild-${EB_VERSION}.eb - echo_yellow ">> Still no module for EasyBuild v${EB_VERSION}, trying with easyconfig ${eb_ec}..." - ${EB} --search ${eb_ec} | grep ${eb_ec} > /dev/null + module avail --ignore_cache 2>&1 | grep -i easybuild/${EB_VERSION} &> ${ml_av_easybuild_out} if [[ $? -eq 0 ]]; then - echo "Easyconfig ${eb_ec} found for EasyBuild v${EB_VERSION}, so installing it..." - ok_msg="EasyBuild v${EB_VERSION} installed, alright!" - fail_msg="Installing EasyBuild v${EB_VERSION}, yikes! (output: ${eb_install_out})" - ${EB} EasyBuild-${EB_VERSION}.eb 2>&1 | tee -a ${eb_install_out} - check_exit_code $? "${ok_msg}" "${fail_msg}" + echo_green ">> Module for EasyBuild v${EB_VERSION} found!" else - fatal_error "No easyconfig found for EasyBuild v${EB_VERSION}" + eb_ec=EasyBuild-${EB_VERSION}.eb + echo_yellow ">> Still no module for EasyBuild v${EB_VERSION}, trying with easyconfig ${eb_ec}..." + ${EB} --search ${eb_ec} | grep ${eb_ec} > /dev/null + if [[ $? -eq 0 ]]; then + echo "Easyconfig ${eb_ec} found for EasyBuild v${EB_VERSION}, so installing it..." + ok_msg="EasyBuild v${EB_VERSION} installed, alright!" + fail_msg="Installing EasyBuild v${EB_VERSION}, yikes! (output: ${eb_install_out})" + ${EB} EasyBuild-${EB_VERSION}.eb 2>&1 | tee -a ${eb_install_out} + check_exit_code $? "${ok_msg}" "${fail_msg}" + else + fatal_error "No easyconfig found for EasyBuild v${EB_VERSION}" + fi fi fi From 48735b571c31fcf443596c16fea87ad1e634a138 Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Mon, 30 Oct 2023 13:55:18 +0100 Subject: [PATCH 31/40] Fix position ignore_cache flag --- load_easybuild_module.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/load_easybuild_module.sh b/load_easybuild_module.sh index c027a4b4b1..9f7716543a 100755 --- a/load_easybuild_module.sh +++ b/load_easybuild_module.sh @@ -75,7 +75,7 @@ else if [[ $? -eq 0 ]]; then echo_green ">> Module for EasyBuild v${EB_VERSION} found!" else - module avail --ignore_cache 2>&1 | grep -i easybuild/${EB_VERSION} &> ${ml_av_easybuild_out} + module --ignore_cache avail 2>&1 | grep -i easybuild/${EB_VERSION} &> ${ml_av_easybuild_out} if [[ $? -eq 0 ]]; then echo_green ">> Module for EasyBuild v${EB_VERSION} found!" else From d97d23bacf7671d9c8dbc0381d917ddb26a539cd Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Mon, 30 Oct 2023 14:56:07 +0100 Subject: [PATCH 32/40] Also ignore cache when loading EB module --- load_easybuild_module.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/load_easybuild_module.sh b/load_easybuild_module.sh index 9f7716543a..11c780dcdd 100755 --- a/load_easybuild_module.sh +++ b/load_easybuild_module.sh @@ -71,10 +71,12 @@ else check_exit_code $? "${ok_msg}" "${fail_msg}" # maybe the module obtained with --install-latest-eb-release is exactly the EasyBuild version we wanted? + IGNORE_CACHE='' module avail 2>&1 | grep -i easybuild/${EB_VERSION} &> ${ml_av_easybuild_out} if [[ $? -eq 0 ]]; then echo_green ">> Module for EasyBuild v${EB_VERSION} found!" else + IGNORE_CACHE='--ignore_cache' module --ignore_cache avail 2>&1 | grep -i easybuild/${EB_VERSION} &> ${ml_av_easybuild_out} if [[ $? -eq 0 ]]; then echo_green ">> Module for EasyBuild v${EB_VERSION} found!" @@ -108,7 +110,7 @@ else fi echo ">> Loading EasyBuild v${EB_VERSION} module..." -module load EasyBuild/${EB_VERSION} +module ${IGNORE_CACHE} load EasyBuild/${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 From a8fdd91817d0bb9a884fb2bf42520f1919a1e51c Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Mon, 30 Oct 2023 15:59:53 +0100 Subject: [PATCH 33/40] Move IGNORE_CACHE variable down --- load_easybuild_module.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/load_easybuild_module.sh b/load_easybuild_module.sh index 11c780dcdd..d1bfd18bb5 100755 --- a/load_easybuild_module.sh +++ b/load_easybuild_module.sh @@ -76,10 +76,10 @@ else if [[ $? -eq 0 ]]; then echo_green ">> Module for EasyBuild v${EB_VERSION} found!" else - IGNORE_CACHE='--ignore_cache' module --ignore_cache avail 2>&1 | grep -i easybuild/${EB_VERSION} &> ${ml_av_easybuild_out} if [[ $? -eq 0 ]]; then echo_green ">> Module for EasyBuild v${EB_VERSION} found!" + IGNORE_CACHE='--ignore_cache' else eb_ec=EasyBuild-${EB_VERSION}.eb echo_yellow ">> Still no module for EasyBuild v${EB_VERSION}, trying with easyconfig ${eb_ec}..." From cc4e2c03421f52a8be699adeed35dccac04266db Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Mon, 30 Oct 2023 17:46:40 +0100 Subject: [PATCH 34/40] {2023.06} EasyBuild v4.8.2 + attempt module loads without cache --- eessi-2023.06-eb-4.8.1-system.yml | 3 +++ load_easybuild_module.sh | 31 +++++++++++++++++++------------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/eessi-2023.06-eb-4.8.1-system.yml b/eessi-2023.06-eb-4.8.1-system.yml index 1e9664e10f..3d0e1c3c32 100644 --- a/eessi-2023.06-eb-4.8.1-system.yml +++ b/eessi-2023.06-eb-4.8.1-system.yml @@ -4,3 +4,6 @@ easyconfigs: - ReFrame-4.3.3.eb: options: from-pr: 18851 + - EasyBuild-4.8.2.eb: + options: + from-pr: 19101 diff --git a/load_easybuild_module.sh b/load_easybuild_module.sh index 4ff2a3c37c..d1bfd18bb5 100755 --- a/load_easybuild_module.sh +++ b/load_easybuild_module.sh @@ -23,14 +23,14 @@ fi EB_VERSION=${1} # make sure that environment variables that we expect to be set are indeed set -if [ -z "${TMPDIR}" ]; then +if [ -z "${TMPDIR}" ]; then echo "\$TMPDIR is not set" >&2 exit 2 fi # ${EB} is used to specify which 'eb' command should be used; # can potentially be more than just 'eb', for example when using 'eb --optarch=GENERIC' -if [ -z "${EB}" ]; then +if [ -z "${EB}" ]; then echo "\$EB is not set" >&2 exit 2 fi @@ -71,21 +71,28 @@ else check_exit_code $? "${ok_msg}" "${fail_msg}" # maybe the module obtained with --install-latest-eb-release is exactly the EasyBuild version we wanted? + IGNORE_CACHE='' module avail 2>&1 | grep -i easybuild/${EB_VERSION} &> ${ml_av_easybuild_out} if [[ $? -eq 0 ]]; then echo_green ">> Module for EasyBuild v${EB_VERSION} found!" else - eb_ec=EasyBuild-${EB_VERSION}.eb - echo_yellow ">> Still no module for EasyBuild v${EB_VERSION}, trying with easyconfig ${eb_ec}..." - ${EB} --search ${eb_ec} | grep ${eb_ec} > /dev/null + module --ignore_cache avail 2>&1 | grep -i easybuild/${EB_VERSION} &> ${ml_av_easybuild_out} if [[ $? -eq 0 ]]; then - echo "Easyconfig ${eb_ec} found for EasyBuild v${EB_VERSION}, so installing it..." - ok_msg="EasyBuild v${EB_VERSION} installed, alright!" - fail_msg="Installing EasyBuild v${EB_VERSION}, yikes! (output: ${eb_install_out})" - ${EB} EasyBuild-${EB_VERSION}.eb 2>&1 | tee -a ${eb_install_out} - check_exit_code $? "${ok_msg}" "${fail_msg}" + echo_green ">> Module for EasyBuild v${EB_VERSION} found!" + IGNORE_CACHE='--ignore_cache' else - fatal_error "No easyconfig found for EasyBuild v${EB_VERSION}" + eb_ec=EasyBuild-${EB_VERSION}.eb + echo_yellow ">> Still no module for EasyBuild v${EB_VERSION}, trying with easyconfig ${eb_ec}..." + ${EB} --search ${eb_ec} | grep ${eb_ec} > /dev/null + if [[ $? -eq 0 ]]; then + echo "Easyconfig ${eb_ec} found for EasyBuild v${EB_VERSION}, so installing it..." + ok_msg="EasyBuild v${EB_VERSION} installed, alright!" + fail_msg="Installing EasyBuild v${EB_VERSION}, yikes! (output: ${eb_install_out})" + ${EB} EasyBuild-${EB_VERSION}.eb 2>&1 | tee -a ${eb_install_out} + check_exit_code $? "${ok_msg}" "${fail_msg}" + else + fatal_error "No easyconfig found for EasyBuild v${EB_VERSION}" + fi fi fi @@ -103,7 +110,7 @@ else fi echo ">> Loading EasyBuild v${EB_VERSION} module..." -module load EasyBuild/${EB_VERSION} +module ${IGNORE_CACHE} load EasyBuild/${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 From c1b29b3d3384c0a3a570252703d274537437e75c Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Mon, 30 Oct 2023 18:09:34 +0100 Subject: [PATCH 35/40] Use correct 4.8.2 PR --- eessi-2023.06-eb-4.8.1-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eessi-2023.06-eb-4.8.1-system.yml b/eessi-2023.06-eb-4.8.1-system.yml index 3d0e1c3c32..b0731d2534 100644 --- a/eessi-2023.06-eb-4.8.1-system.yml +++ b/eessi-2023.06-eb-4.8.1-system.yml @@ -6,4 +6,4 @@ easyconfigs: from-pr: 18851 - EasyBuild-4.8.2.eb: options: - from-pr: 19101 + from-pr: 19105 From 0f803f491d6dfbbeab55cc08d7d70d6e7d3b8e40 Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Mon, 30 Oct 2023 18:12:41 +0100 Subject: [PATCH 36/40] Use correct 4.8.2 PR --- eessi-2023.06-eb-4.8.1-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eessi-2023.06-eb-4.8.1-system.yml b/eessi-2023.06-eb-4.8.1-system.yml index 3d0e1c3c32..b0731d2534 100644 --- a/eessi-2023.06-eb-4.8.1-system.yml +++ b/eessi-2023.06-eb-4.8.1-system.yml @@ -6,4 +6,4 @@ easyconfigs: from-pr: 18851 - EasyBuild-4.8.2.eb: options: - from-pr: 19101 + from-pr: 19105 From 2aee11e3dac9a9b748e1456aba10d68aca22fce6 Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Tue, 31 Oct 2023 14:15:20 +0100 Subject: [PATCH 37/40] Test excluding filter-deps for AOFlagger and casacore --- eessi-2023.06-eb-4.8.2-2022a.yml | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/eessi-2023.06-eb-4.8.2-2022a.yml b/eessi-2023.06-eb-4.8.2-2022a.yml index 5e812716f2..8dbfe5c223 100644 --- a/eessi-2023.06-eb-4.8.2-2022a.yml +++ b/eessi-2023.06-eb-4.8.2-2022a.yml @@ -1,3 +1,55 @@ easyconfigs: + - casacore-3.5.0-foss-2022a: + options: + from-pr: 19119 + # Exclude ncurses + filter-deps: + - Autoconf + - Automake + - Autotools + - binutils + - bzip2 + - DBus + - flex + - gettext + - gperf + - help2man + - intltool + - libreadline + - libtool + - Lua + - M4 + - makeinfo + - util-linux + - XZ + - zlib + - AOFlagger-3.4.0-foss-2022a: + options: + from-pr: 19119 + # Exclude Lua + filter-deps: + - Autoconf + - Automake + - Autotools + - binutils + - bzip2 + - DBus + - flex + - gettext + - gperf + - help2man + - intltool + - libreadline + - libtool + - ncurses + - M4 + - makeinfo + - util-linux + - XZ + - zlib - DP3-6.0-foss-2022a: + options: + from-pr: 19119 - WSClean-3.4-foss-2022a: + options: + from-pr: 19119 From 7259183a4965ff0c83b75a7bc2f04fb47d1c4381 Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Tue, 31 Oct 2023 14:53:53 +0100 Subject: [PATCH 38/40] Remove casacore (ncurses is picked up from compat layer) --- eessi-2023.06-eb-4.8.2-2022a.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/eessi-2023.06-eb-4.8.2-2022a.yml b/eessi-2023.06-eb-4.8.2-2022a.yml index 8dbfe5c223..6b0dbc0387 100644 --- a/eessi-2023.06-eb-4.8.2-2022a.yml +++ b/eessi-2023.06-eb-4.8.2-2022a.yml @@ -1,28 +1,4 @@ easyconfigs: - - casacore-3.5.0-foss-2022a: - options: - from-pr: 19119 - # Exclude ncurses - filter-deps: - - Autoconf - - Automake - - Autotools - - binutils - - bzip2 - - DBus - - flex - - gettext - - gperf - - help2man - - intltool - - libreadline - - libtool - - Lua - - M4 - - makeinfo - - util-linux - - XZ - - zlib - AOFlagger-3.4.0-foss-2022a: options: from-pr: 19119 From a7294c51c28d5be8a1871e4e165f708ec3ce0a16 Mon Sep 17 00:00:00 2001 From: t1mk1k <96469032+t1mk1k@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:02:37 +0100 Subject: [PATCH 39/40] Explain why Lua is excluded from filter-deps Co-authored-by: ocaisa --- eessi-2023.06-eb-4.8.2-2022a.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eessi-2023.06-eb-4.8.2-2022a.yml b/eessi-2023.06-eb-4.8.2-2022a.yml index 6b0dbc0387..b0e1992efe 100644 --- a/eessi-2023.06-eb-4.8.2-2022a.yml +++ b/eessi-2023.06-eb-4.8.2-2022a.yml @@ -2,7 +2,7 @@ easyconfigs: - AOFlagger-3.4.0-foss-2022a: options: from-pr: 19119 - # Exclude Lua + # Exclude Lua from `filter-deps` as the compat layer version is too old for the software filter-deps: - Autoconf - Automake From 31894ec295344e55338be9b225efabff20f9ae9a Mon Sep 17 00:00:00 2001 From: Tim Kok Date: Tue, 31 Oct 2023 17:01:17 +0100 Subject: [PATCH 40/40] Include casacore and EveryBeam from PR 19119 --- eessi-2023.06-eb-4.8.2-2022a.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eessi-2023.06-eb-4.8.2-2022a.yml b/eessi-2023.06-eb-4.8.2-2022a.yml index b0e1992efe..bab796db2b 100644 --- a/eessi-2023.06-eb-4.8.2-2022a.yml +++ b/eessi-2023.06-eb-4.8.2-2022a.yml @@ -1,4 +1,7 @@ easyconfigs: + - casacore-3.5.0-foss-2022a: + options: + from-pr: 19119 - AOFlagger-3.4.0-foss-2022a: options: from-pr: 19119 @@ -23,6 +26,9 @@ easyconfigs: - util-linux - XZ - zlib + - EveryBeam-0.5.2-foss-2022a: + options: + from-pr: 19119 - DP3-6.0-foss-2022a: options: from-pr: 19119