From 38a74b9d3de5984b0cf893bbb98dae1a09cddee9 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 12 Apr 2025 15:45:26 +0200 Subject: [PATCH 1/3] add Lmod hook that prints warning for SciPy-bundle on Grace/Hopper --- create_lmodsitepackage.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/create_lmodsitepackage.py b/create_lmodsitepackage.py index ecd73a7f01..51220ac312 100755 --- a/create_lmodsitepackage.py +++ b/create_lmodsitepackage.py @@ -199,10 +199,31 @@ end end +local function eessi_scipy_2022b_test_failures_message(t) + local cpuArch = os.getenv("EESSI_SOFTWARE_SUBDIR") + local graceArch = 'aarch64/nvidia/grace' + local fullModuleName = 'SciPy-bundle/2023.02-gfbf-2022b' + local moduleVersionArchMatch = t.modFullName == fullModuleName and cpuArch == graceArch + if moduleVersionArchMatch and not os.getenv("EESSI_IGNORE_MODULE_WARNINGS") then + -- Print a message on loading SciPy-bundle version == 2023.02 informing about the higher number of + -- test failures and recommend using other versions available via EESSI. + -- A message and not a warning as the exit code would break CI runs otherwise. + local simpleName = string.match(t.modFullName, "(.-)/") + local advice = 'The module ' .. t.modFullName .. ' will be loaded. However, note that\n' + advice = advice .. 'during its building for the CPU microarchitecture ' .. graceArch .. ' from a\n' + advice = advice .. 'total of 52.730 unit tests a larger number (46) than usually (2-4) failed. If\n' + advice = advice .. 'you encounter issues while using ' .. t.modFullName .. ', please,\n' + advice = advice .. 'consider using one of the other versions of ' .. simpleName .. ' that are also provided\n' + advice = advice .. 'for the same CPU microarchitecture.\n' + LmodMessage("\n", advice) + end +end + -- Combine both functions into a single one, as we can only register one function as load hook in lmod -- Also: make it non-local, so it can be imported and extended by other lmodrc files if needed function eessi_load_hook(t) eessi_espresso_deprecated_message(t) + eessi_scipy_2022b_test_failures_message(t) -- Only apply CUDA and cu*-library hooks if the loaded module is in the EESSI prefix -- This avoids getting an Lmod Error when trying to load a CUDA or cu* module from a local software stack if from_eessi_prefix(t) then From 2cb94cbbb5ad0fb4594b5008936c3681f9ef3cd0 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 12 Apr 2025 16:26:57 +0200 Subject: [PATCH 2/3] need to escape line returns --- create_lmodsitepackage.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/create_lmodsitepackage.py b/create_lmodsitepackage.py index 51220ac312..6acef9bffa 100755 --- a/create_lmodsitepackage.py +++ b/create_lmodsitepackage.py @@ -209,13 +209,13 @@ -- test failures and recommend using other versions available via EESSI. -- A message and not a warning as the exit code would break CI runs otherwise. local simpleName = string.match(t.modFullName, "(.-)/") - local advice = 'The module ' .. t.modFullName .. ' will be loaded. However, note that\n' - advice = advice .. 'during its building for the CPU microarchitecture ' .. graceArch .. ' from a\n' - advice = advice .. 'total of 52.730 unit tests a larger number (46) than usually (2-4) failed. If\n' - advice = advice .. 'you encounter issues while using ' .. t.modFullName .. ', please,\n' - advice = advice .. 'consider using one of the other versions of ' .. simpleName .. ' that are also provided\n' - advice = advice .. 'for the same CPU microarchitecture.\n' - LmodMessage("\n", advice) + local advice = 'The module ' .. t.modFullName .. ' will be loaded. However, note that\\n' + advice = advice .. 'during its building for the CPU microarchitecture ' .. graceArch .. ' from a\\n' + advice = advice .. 'total of 52.730 unit tests a larger number (46) than usually (2-4) failed. If\\n' + advice = advice .. 'you encounter issues while using ' .. t.modFullName .. ', please,\\n' + advice = advice .. 'consider using one of the other versions of ' .. simpleName .. ' that are also provided\\n' + advice = advice .. 'for the same CPU microarchitecture.\\n' + LmodMessage("\\n", advice) end end From 63c27f8a7ae3609503d56151619f13eb625e876b Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 12 Apr 2025 18:30:46 +0200 Subject: [PATCH 3/3] use --contain when launching container for test step --- bot/test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot/test.sh b/bot/test.sh index 7160ff7e5d..b615be0020 100755 --- a/bot/test.sh +++ b/bot/test.sh @@ -192,6 +192,10 @@ COMMON_ARGS+=("--mode" "run") [[ ! -z ${HTTPS_PROXY} ]] && COMMON_ARGS+=("--https-proxy" "${HTTPS_PROXY}") [[ ! -z ${REPOSITORY} ]] && COMMON_ARGS+=("--repository" "${REPOSITORY}") +# pass through '--contain' to avoid leaking in scripts into the container session +# note, --pass-through can be used multiple times if needed +COMMON_ARGS+=("--pass-through" "--contain") + # make sure to use the same parent dir for storing tarballs of tmp PREVIOUS_TMP_DIR=${PWD}/previous_tmp