From db81fd36358c0430bfc6d3ae2784b7e0958d097a Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 07:05:40 +0200 Subject: [PATCH 01/15] zen4-only {2023.06}[system] EasyBuild v4.9.1 --- .../2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml diff --git a/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml b/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml new file mode 100644 index 0000000000..c5a08b5209 --- /dev/null +++ b/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml @@ -0,0 +1,4 @@ +easyconfigs: + - EasyBuild-4.9.1.eb: + options: + from-pr: 20299 From 8cb9547b0c2b1b3bd1736b57d754fa9cad01516b Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 14:10:55 +0200 Subject: [PATCH 02/15] make sure lmod cfg files exists early in build environment --- EESSI-install-software.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 91effe4aba..7f67b883f2 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -147,6 +147,24 @@ else mkdir -p ${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE} fi +# if we run the script for the first time, e.g., to start building for a new +# stack, we need to ensure certain files are present in +# ${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE} +# - .lmod/lmodrc.lua +# - .lmod/SitePackage.lua +_eessi_software_path=${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE} +_lmod_cfg_dir=${_eessi_software_path}/.lmod +_lmod_rc_file=${_lmod_cfg_dir}/lmodrc.lua +if [ ! -f ${_lmod_rc_file} ]; then + command -V python3 + python3 ${TOPDIR}/create_lmodrc.py ${_eessi_software_path} +fi +_lmod_sitepackage_file=${_lmod_cfg_dir}/SitePackage.lua +if [ ! -f ${_lmod_sitepackage_file} ]; then + command -V python3 + python3 ${TOPDIR}/create_lmodrc.py ${_eessi_software_path} +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 From da9f206f216c70b8559bdd002235a754125aba2d Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 14:18:58 +0200 Subject: [PATCH 03/15] use create_lmodsitepackage.py --- EESSI-install-software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 7f67b883f2..13e94fb72d 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -162,7 +162,7 @@ fi _lmod_sitepackage_file=${_lmod_cfg_dir}/SitePackage.lua if [ ! -f ${_lmod_sitepackage_file} ]; then command -V python3 - python3 ${TOPDIR}/create_lmodrc.py ${_eessi_software_path} + python3 ${TOPDIR}/create_lmodsitepackage.py ${_eessi_software_path} fi # Set all the EESSI environment variables (respecting $EESSI_SOFTWARE_SUBDIR_OVERRIDE) From c4cbcd8b9b6212c830e371aa3013eee8977ff776 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 14:41:02 +0200 Subject: [PATCH 04/15] skip CUDA install if no EasyBuild module is found --- EESSI-install-software.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 13e94fb72d..2d401e40ce 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -221,10 +221,21 @@ ${TOPDIR}/install_scripts.sh --prefix ${EESSI_PREFIX} # Hardcode this for now, see if it works # TODO: We should make a nice yaml and loop over all CUDA versions in that yaml to figure out what to install # Allow skipping CUDA SDK install in e.g. CI environments +# The install_cuda... script uses EasyBuild. So, we need to check if we have EB +# or skip this step. +module_avail_out=$TMPDIR/ml.out +module avail 2>&1 | grep EasyBuild &> ${module_avail_out} +if [[ $? -eq 0 ]]; then + echo_green ">> Found an EasyBuild module" +else + echo_yellow ">> No EasyBuild module found: skipping step to install CUDA (see output in ${module_avail_out})" + export skip_cuda_install=True +fi +if if [ -z "${skip_cuda_install}" ] || [ ! "${skip_cuda_install}" ]; then ${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_host_injections.sh -c 12.1.1 --accept-cuda-eula else - echo "Skipping installation of CUDA SDK in host_injections, since the --skip-cuda-install flag was passed" + echo "Skipping installation of CUDA SDK in host_injections, since the --skip-cuda-install flag was passed OR no EasyBuild module was found" fi # Install drivers in host_injections From eeb5537e4b8889cbbf183ffd17e4743961357f3c Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 14:45:17 +0200 Subject: [PATCH 05/15] remove extra if --- EESSI-install-software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 2d401e40ce..8a5789c2b2 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -231,7 +231,7 @@ else echo_yellow ">> No EasyBuild module found: skipping step to install CUDA (see output in ${module_avail_out})" export skip_cuda_install=True fi -if + if [ -z "${skip_cuda_install}" ] || [ ! "${skip_cuda_install}" ]; then ${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_host_injections.sh -c 12.1.1 --accept-cuda-eula else From 0639e6a11efaeec434e04a3212221891245900f7 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 16:29:22 +0200 Subject: [PATCH 06/15] add support for zen4 in archdetect (taken from PR 451) --- .github/workflows/tests_archdetect.yml | 2 ++ init/arch_specs/eessi_arch_x86.spec | 7 ++--- .../amd/zen4/Azure-Alma8-9V33X.all.output | 1 + .../x86_64/amd/zen4/Azure-Alma8-9V33X.cpuinfo | 27 +++++++++++++++++++ .../x86_64/amd/zen4/Azure-Alma8-9V33X.output | 1 + .../amd/zen4/Shinx-RHEL8-9654.all.output | 1 + .../x86_64/amd/zen4/Shinx-RHEL8-9654.cpuinfo | 27 +++++++++++++++++++ .../x86_64/amd/zen4/Shinx-RHEL8-9654.output | 1 + 8 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 tests/archdetect/x86_64/amd/zen4/Azure-Alma8-9V33X.all.output create mode 100644 tests/archdetect/x86_64/amd/zen4/Azure-Alma8-9V33X.cpuinfo create mode 100644 tests/archdetect/x86_64/amd/zen4/Azure-Alma8-9V33X.output create mode 100644 tests/archdetect/x86_64/amd/zen4/Shinx-RHEL8-9654.all.output create mode 100644 tests/archdetect/x86_64/amd/zen4/Shinx-RHEL8-9654.cpuinfo create mode 100644 tests/archdetect/x86_64/amd/zen4/Shinx-RHEL8-9654.output diff --git a/.github/workflows/tests_archdetect.yml b/.github/workflows/tests_archdetect.yml index 922c9a1bf0..bee348995d 100644 --- a/.github/workflows/tests_archdetect.yml +++ b/.github/workflows/tests_archdetect.yml @@ -13,6 +13,8 @@ jobs: - x86_64/intel/skylake_avx512/archspec-linux-6132 - x86_64/amd/zen2/Azure-CentOS7-7V12 - x86_64/amd/zen3/Azure-CentOS7-7V73X + - x86_64/amd/zen4/Azure-Alma8-9V33X + - x86_64/amd/zen4/Shinx-RHEL8-9654 - aarch64/neoverse_n1/Azure-Ubuntu20-Altra - aarch64/neoverse_n1/AWS-awslinux-graviton2 - aarch64/neoverse_v1/AWS-awslinux-graviton3 diff --git a/init/arch_specs/eessi_arch_x86.spec b/init/arch_specs/eessi_arch_x86.spec index 8d01cb0c03..81a7429a8d 100755 --- a/init/arch_specs/eessi_arch_x86.spec +++ b/init/arch_specs/eessi_arch_x86.spec @@ -1,6 +1,7 @@ # x86_64 CPU architecture specifications # Software path in EESSI | Vendor ID | List of defining CPU features -"x86_64/intel/haswell" "GenuineIntel" "avx2 fma" # Intel Haswell, Broadwell +"x86_64/intel/haswell" "GenuineIntel" "avx2 fma" # Intel Haswell, Broadwell "x86_64/intel/skylake_avx512" "GenuineIntel" "avx2 fma avx512f avx512bw avx512cd avx512dq avx512vl" # Intel Skylake, Cascade Lake -"x86_64/amd/zen2" "AuthenticAMD" "avx2 fma" # AMD Rome -"x86_64/amd/zen3" "AuthenticAMD" "avx2 fma vaes" # AMD Milan, Milan-X +"x86_64/amd/zen2" "AuthenticAMD" "avx2 fma" # AMD Rome +"x86_64/amd/zen3" "AuthenticAMD" "avx2 fma vaes" # AMD Milan, Milan-X +"x86_64/amd/zen4" "AuthenticAMD" "avx2 fma vaes avx512f avx512ifma" # AMD Genoa, Genoa-X diff --git a/tests/archdetect/x86_64/amd/zen4/Azure-Alma8-9V33X.all.output b/tests/archdetect/x86_64/amd/zen4/Azure-Alma8-9V33X.all.output new file mode 100644 index 0000000000..e1bbd79e4a --- /dev/null +++ b/tests/archdetect/x86_64/amd/zen4/Azure-Alma8-9V33X.all.output @@ -0,0 +1 @@ +x86_64/amd/zen4:x86_64/amd/zen3:x86_64/amd/zen2:x86_64/generic diff --git a/tests/archdetect/x86_64/amd/zen4/Azure-Alma8-9V33X.cpuinfo b/tests/archdetect/x86_64/amd/zen4/Azure-Alma8-9V33X.cpuinfo new file mode 100644 index 0000000000..4a97da862c --- /dev/null +++ b/tests/archdetect/x86_64/amd/zen4/Azure-Alma8-9V33X.cpuinfo @@ -0,0 +1,27 @@ +processor : 0 +vendor_id : AuthenticAMD +cpu family : 25 +model : 17 +model name : AMD EPYC 9V33X 96-Core Processor +stepping : 1 +microcode : 0xffffffff +cpu MHz : 3705.853 +cache size : 1024 KB +physical id : 0 +siblings : 88 +core id : 0 +cpu cores : 88 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 13 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm +bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass +bogomips : 5100.08 +TLB size : 3584 4K pages +clflush size : 64 +cache_alignment : 64 +address sizes : 48 bits physical, 48 bits virtual +power management: diff --git a/tests/archdetect/x86_64/amd/zen4/Azure-Alma8-9V33X.output b/tests/archdetect/x86_64/amd/zen4/Azure-Alma8-9V33X.output new file mode 100644 index 0000000000..950740a78c --- /dev/null +++ b/tests/archdetect/x86_64/amd/zen4/Azure-Alma8-9V33X.output @@ -0,0 +1 @@ +x86_64/amd/zen4 diff --git a/tests/archdetect/x86_64/amd/zen4/Shinx-RHEL8-9654.all.output b/tests/archdetect/x86_64/amd/zen4/Shinx-RHEL8-9654.all.output new file mode 100644 index 0000000000..e1bbd79e4a --- /dev/null +++ b/tests/archdetect/x86_64/amd/zen4/Shinx-RHEL8-9654.all.output @@ -0,0 +1 @@ +x86_64/amd/zen4:x86_64/amd/zen3:x86_64/amd/zen2:x86_64/generic diff --git a/tests/archdetect/x86_64/amd/zen4/Shinx-RHEL8-9654.cpuinfo b/tests/archdetect/x86_64/amd/zen4/Shinx-RHEL8-9654.cpuinfo new file mode 100644 index 0000000000..f28381d7a2 --- /dev/null +++ b/tests/archdetect/x86_64/amd/zen4/Shinx-RHEL8-9654.cpuinfo @@ -0,0 +1,27 @@ +processor : 0 +vendor_id : AuthenticAMD +cpu family : 25 +model : 17 +model name : AMD EPYC 9654 96-Core Processor +stepping : 1 +microcode : 0xa10113e +cpu MHz : 3699.993 +cache size : 1024 KB +physical id : 0 +siblings : 96 +core id : 0 +cpu cores : 96 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 16 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 clzero irperf xsaveerptr wbnoinvd amd_ppin cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid overflow_recov succor smca fsrm flush_l1d +bugs : sysret_ss_attrs spectre_v1 spectre_v2 spec_store_bypass +bogomips : 4799.99 +TLB size : 3584 4K pages +clflush size : 64 +cache_alignment : 64 +address sizes : 52 bits physical, 57 bits virtual +power management: ts ttp tm hwpstate cpb eff_freq_ro [13] [14] diff --git a/tests/archdetect/x86_64/amd/zen4/Shinx-RHEL8-9654.output b/tests/archdetect/x86_64/amd/zen4/Shinx-RHEL8-9654.output new file mode 100644 index 0000000000..950740a78c --- /dev/null +++ b/tests/archdetect/x86_64/amd/zen4/Shinx-RHEL8-9654.output @@ -0,0 +1 @@ +x86_64/amd/zen4 From 67187ebb524426728cdfef047a20772c38d07693 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 16:57:38 +0200 Subject: [PATCH 07/15] removed some initialisation + some debug printouts + TODOs --- test_suite.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test_suite.sh b/test_suite.sh index 95eb9daa2a..3712c8c716 100755 --- a/test_suite.sh +++ b/test_suite.sh @@ -74,13 +74,17 @@ fi TMPDIR=$(mktemp -d) echo ">> Setting up environment..." -module --force purge -export EESSI_SOFTWARE_SUBDIR_OVERRIDE=$(python3 $TOPDIR/eessi_software_subdir.py $DETECTION_PARAMETERS) +# TODO test if module is declared, if so purge modules +#module --force purge +# TODO why do we need to set this here? should already be defined by bot +#export EESSI_SOFTWARE_SUBDIR_OVERRIDE=$(python3 $TOPDIR/eessi_software_subdir.py $DETECTION_PARAMETERS) +echo "EESSI_SOFTWARE_SUBDIR_OVERRIDE='${EESSI_SOFTWARE_SUBDIR_OVERRIDE}'" source $TOPDIR/init/bash # Load the ReFrame module # Currently, we load the default version. Maybe we should somehow make this configurable in the future? +# TODO what if no ReFrame module is available yet? --> FAILURE with description? module load ReFrame if [[ $? -eq 0 ]]; then echo_green ">> Loaded ReFrame module" From 9dd538b40fa8fa00fcc5152f25d2320ffe86303e Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 17:32:13 +0200 Subject: [PATCH 08/15] more debug output --- test_suite.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_suite.sh b/test_suite.sh index 3712c8c716..d5086897ee 100755 --- a/test_suite.sh +++ b/test_suite.sh @@ -80,6 +80,8 @@ echo ">> Setting up environment..." #export EESSI_SOFTWARE_SUBDIR_OVERRIDE=$(python3 $TOPDIR/eessi_software_subdir.py $DETECTION_PARAMETERS) echo "EESSI_SOFTWARE_SUBDIR_OVERRIDE='${EESSI_SOFTWARE_SUBDIR_OVERRIDE}'" +echo "sourcing '$TOPDIR/init/bash'" +cat $TOPDIR/init/bash source $TOPDIR/init/bash # Load the ReFrame module From 23ab56ebcc03f49f6964f4ebfc0b990dba334e2e Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 17:52:00 +0200 Subject: [PATCH 09/15] run archdetect with debug info --- init/eessi_environment_variables | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/eessi_environment_variables b/init/eessi_environment_variables index 5450b2bfb4..445a9451ed 100644 --- a/init/eessi_environment_variables +++ b/init/eessi_environment_variables @@ -27,7 +27,7 @@ if [ -d $EESSI_PREFIX ]; then # determine subdirectory in software layer if [ "$EESSI_USE_ARCHDETECT" == "1" ]; then # if archdetect is enabled, use internal code - all_cpupaths=$(${EESSI_INIT_DIR_PATH}/eessi_archdetect.sh -a cpupath) + all_cpupaths=$(${EESSI_INIT_DIR_PATH}/eessi_archdetect.sh -d -a cpupath) # iterate over colon-separated list verifying if the architecture is present # under $EESSI_PREFIX/software/$EESSI_OS_TYPE; if so use the architecture as best match IFS=: read -r -a archs <<< "${all_cpupaths}" From 0750a054a23ac244441f78c52a6f0446814cbf1d Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 18:43:24 +0200 Subject: [PATCH 10/15] Revert "run archdetect with debug info" This reverts commit 23ab56ebcc03f49f6964f4ebfc0b990dba334e2e. --- init/eessi_environment_variables | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/eessi_environment_variables b/init/eessi_environment_variables index 445a9451ed..5450b2bfb4 100644 --- a/init/eessi_environment_variables +++ b/init/eessi_environment_variables @@ -27,7 +27,7 @@ if [ -d $EESSI_PREFIX ]; then # determine subdirectory in software layer if [ "$EESSI_USE_ARCHDETECT" == "1" ]; then # if archdetect is enabled, use internal code - all_cpupaths=$(${EESSI_INIT_DIR_PATH}/eessi_archdetect.sh -d -a cpupath) + all_cpupaths=$(${EESSI_INIT_DIR_PATH}/eessi_archdetect.sh -a cpupath) # iterate over colon-separated list verifying if the architecture is present # under $EESSI_PREFIX/software/$EESSI_OS_TYPE; if so use the architecture as best match IFS=: read -r -a archs <<< "${all_cpupaths}" From 969a5b5de52e7458ff6c4b66f2d7ef3d80287a98 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 18:44:02 +0200 Subject: [PATCH 11/15] Revert "more debug output" This reverts commit 9dd538b40fa8fa00fcc5152f25d2320ffe86303e. --- test_suite.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/test_suite.sh b/test_suite.sh index d5086897ee..3712c8c716 100755 --- a/test_suite.sh +++ b/test_suite.sh @@ -80,8 +80,6 @@ echo ">> Setting up environment..." #export EESSI_SOFTWARE_SUBDIR_OVERRIDE=$(python3 $TOPDIR/eessi_software_subdir.py $DETECTION_PARAMETERS) echo "EESSI_SOFTWARE_SUBDIR_OVERRIDE='${EESSI_SOFTWARE_SUBDIR_OVERRIDE}'" -echo "sourcing '$TOPDIR/init/bash'" -cat $TOPDIR/init/bash source $TOPDIR/init/bash # Load the ReFrame module From f6e9d9888c90c82707f5050e667da71dcef1ed7b Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 19:08:36 +0200 Subject: [PATCH 12/15] if EESSI_SOFTWARE_SUBDIR_OVERRIDE is present, don't use *detect --- init/eessi_environment_variables | 51 ++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/init/eessi_environment_variables b/init/eessi_environment_variables index 5450b2bfb4..6a6cb4c783 100644 --- a/init/eessi_environment_variables +++ b/init/eessi_environment_variables @@ -25,26 +25,39 @@ if [ -d $EESSI_PREFIX ]; then if [ -d $EESSI_EPREFIX ]; then # determine subdirectory in software layer - if [ "$EESSI_USE_ARCHDETECT" == "1" ]; then - # if archdetect is enabled, use internal code - all_cpupaths=$(${EESSI_INIT_DIR_PATH}/eessi_archdetect.sh -a cpupath) - # iterate over colon-separated list verifying if the architecture is present - # under $EESSI_PREFIX/software/$EESSI_OS_TYPE; if so use the architecture as best match - IFS=: read -r -a archs <<< "${all_cpupaths}" - for arch in "${archs[@]}"; do - if [ -d ${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${arch} ]; then - export EESSI_SOFTWARE_SUBDIR=${arch} - show_msg "archdetect says ${EESSI_SOFTWARE_SUBDIR}" - break - fi - done - elif [ "$EESSI_USE_ARCHSPEC" == "1" ]; then - # note: eessi_software_subdir_for_host.py will pick up value from $EESSI_SOFTWARE_SUBDIR_OVERRIDE if it's defined! - export EESSI_EPREFIX_PYTHON=$EESSI_EPREFIX/usr/bin/python3 - export EESSI_SOFTWARE_SUBDIR=$($EESSI_EPREFIX_PYTHON ${EESSI_INIT_DIR_PATH}/eessi_software_subdir_for_host.py $EESSI_PREFIX) - show_msg "archspec says ${EESSI_SOFTWARE_SUBDIR}" + if [ ! -z "$EESSI_SOFTWARE_SUBDIR_OVERRIDE" ]; then + # a specific software subdirectory is given, so we use that and don't + # detect it + export EESSI_SOFTWARE_SUBDIR=${EESSI_SOFTWARE_SUBDIR_OVERRIDE} + # however, check if the directory is present in the CernVM-FS repository + # and show a warning if it isn't + cvmfs_software_path=${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR} + if [ ! -d ${cvmfs_software_path} ]; then + show_msg "Warning: EESSI_SOFTWARE_SUBDIRECTORY_OVERRIDE is '${EESSI_SOFTWARE_SUBDIRECTORY_OVERRIDE}'," + show_msg " but directory '${cvmfs_software_path}' does NOT exist in CernVM-FS repository" + fi else - error "Don't know how to detect host CPU, giving up!" + if [ "$EESSI_USE_ARCHDETECT" == "1" ]; then + # if archdetect is enabled, use internal code + all_cpupaths=$(${EESSI_INIT_DIR_PATH}/eessi_archdetect.sh -a cpupath) + # iterate over colon-separated list verifying if the architecture is present + # under $EESSI_PREFIX/software/$EESSI_OS_TYPE; if so use the architecture as best match + IFS=: read -r -a archs <<< "${all_cpupaths}" + for arch in "${archs[@]}"; do + if [ -d ${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${arch} ]; then + export EESSI_SOFTWARE_SUBDIR=${arch} + show_msg "archdetect says ${EESSI_SOFTWARE_SUBDIR}" + break + fi + done + elif [ "$EESSI_USE_ARCHSPEC" == "1" ]; then + # note: eessi_software_subdir_for_host.py will pick up value from $EESSI_SOFTWARE_SUBDIR_OVERRIDE if it's defined! + export EESSI_EPREFIX_PYTHON=$EESSI_EPREFIX/usr/bin/python3 + export EESSI_SOFTWARE_SUBDIR=$($EESSI_EPREFIX_PYTHON ${EESSI_INIT_DIR_PATH}/eessi_software_subdir_for_host.py $EESSI_PREFIX) + show_msg "archspec says ${EESSI_SOFTWARE_SUBDIR}" + else + error "Don't know how to detect host CPU, giving up!" + fi fi if [ ! -z $EESSI_SOFTWARE_SUBDIR ]; then From 9a7d9cf8849b9a37e0da9bd60c39c201ccef2580 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 19:53:30 +0200 Subject: [PATCH 13/15] fix variable name --- init/eessi_environment_variables | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/eessi_environment_variables b/init/eessi_environment_variables index 6a6cb4c783..855693ce2d 100644 --- a/init/eessi_environment_variables +++ b/init/eessi_environment_variables @@ -33,7 +33,7 @@ if [ -d $EESSI_PREFIX ]; then # and show a warning if it isn't cvmfs_software_path=${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR} if [ ! -d ${cvmfs_software_path} ]; then - show_msg "Warning: EESSI_SOFTWARE_SUBDIRECTORY_OVERRIDE is '${EESSI_SOFTWARE_SUBDIRECTORY_OVERRIDE}'," + show_msg "Warning: EESSI_SOFTWARE_SUBDIR_OVERRIDE is '${EESSI_SOFTWARE_SUBDIR_OVERRIDE}'," show_msg " but directory '${cvmfs_software_path}' does NOT exist in CernVM-FS repository" fi else From 320259daab30cd8d1504f0a977151e14b01c34de Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sun, 21 Apr 2024 21:14:07 +0200 Subject: [PATCH 14/15] enable mounting previous overlay-upper read-only --- eessi_container.sh | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/eessi_container.sh b/eessi_container.sh index 7d00d1400c..8430a44d2c 100755 --- a/eessi_container.sh +++ b/eessi_container.sh @@ -594,11 +594,47 @@ declare -a EESSI_FUSE_MOUNTS=() # always mount cvmfs-config repo (to get access to software.eessi.io) EESSI_FUSE_MOUNTS+=("--fusemount" "container:cvmfs2 cvmfs-config.cern.ch /cvmfs/cvmfs-config.cern.ch") +# check if we got some data via --resume and, if so, use the overlayfs +# example scenario: +# 1st step: some software is build in rw mode +# 2nd step: the software is tested in ro mode (same access as when we would use a +# repository) if [[ "${ACCESS}" == "ro" ]]; then - export EESSI_READONLY="container:cvmfs2 ${repo_name} /cvmfs/${repo_name}" + if [[ -d ${EESSI_TMPDIR}/overlay-upper ]]; then + # the overlay-upper directory is only created in a read-write-session, thus + # we are resuming from such a session here (otherwise there shouldn't be such + # directory yet as it is only created for read-write-sessions a bit further + # below); the overlay-upper directory can only exist because it is part of + # the ${RESUME} directory or tarball + # to be able to see the contents of the read-write session we have to mount + # the fuse-overlayfs (in read-only mode) on top of the CernVM-FS repository + + # make sure the overlay-upper directory exists + mkdir -p ${EESSI_TMPDIR}/overlay-upper + + # make the target CernVM-FS repository available under /cvmfs_ro + export EESSI_READONLY="container:cvmfs2 ${repo_name} /cvmfs_ro/${repo_name}" + + EESSI_FUSE_MOUNTS+=("--fusemount" "${EESSI_READONLY}") + + # now, put the overlay-upper read-only on top of the repo and make it under the usual prefix /cvmfs available + EESSI_READONLY_OVERLAY="container:fuse-overlayfs" + # ${EESSI_TMPDIR} is bind mounted to /tmp, hence ${EESSI_TMPDIR}/overlay-upper becomes available as /tmp/overlay-upper + # the left-most lower dir is put on top, with no upperdir=... the whole overlayfs is made available read-only + EESSI_READONLY_OVERLAY+=" -o lowerdir=/tmp/overlay-upper:/cvmfs_ro/${repo_name}" + EESSI_READONLY_OVERLAY+=" ${EESSI_CVMFS_REPO}" + export EESSI_READONLY_OVERLAY + + EESSI_FUSE_MOUNTS+=("--fusemount" "${EESSI_READONLY_OVERLAY}") + export EESSI_FUSE_MOUNTS + else + # no overlay-upper directory means we are in a plain read-only session and + # don't need any fuse-overlayfs + export EESSI_READONLY="container:cvmfs2 ${repo_name} /cvmfs/${repo_name}" - EESSI_FUSE_MOUNTS+=("--fusemount" "${EESSI_READONLY}") - export EESSI_FUSE_MOUNTS + EESSI_FUSE_MOUNTS+=("--fusemount" "${EESSI_READONLY}") + export EESSI_FUSE_MOUNTS + fi fi if [[ "${ACCESS}" == "rw" ]]; then From 1e76d800f3cf2735d99cee765a838af71cfefd82 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sun, 21 Apr 2024 21:50:37 +0200 Subject: [PATCH 15/15] add ReFrame v4.3.3 --- .../2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml b/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml index c5a08b5209..c4da7a90e7 100644 --- a/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml +++ b/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml @@ -2,3 +2,4 @@ easyconfigs: - EasyBuild-4.9.1.eb: options: from-pr: 20299 + - ReFrame-4.3.3.eb