From 028e57ea6110ce0347d8e33c4b6dd843fbb0f7ff Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Wed, 18 Sep 2024 15:23:26 +0200 Subject: [PATCH 1/8] use fixed prefix for tmp tarball and compress it --- eessi_container.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eessi_container.sh b/eessi_container.sh index 34fa833d99..fc97f9877c 100755 --- a/eessi_container.sh +++ b/eessi_container.sh @@ -846,14 +846,14 @@ if [[ ! -z ${SAVE} ]]; then # of these aspects to where the script is used if [[ -d ${SAVE} ]]; then # assume SAVE is name of a directory to which tarball shall be written to - # name format: {REPO_ID}-{TIMESTAMP}.tgz + # name format: tmp_storage-{TIMESTAMP}.tgz ts=$(date +%s) - TGZ=${SAVE}/${REPOSITORY}-${ts}.tgz + TGZ=${SAVE}/tmp_storage-${ts}.tgz else # assume SAVE is the full path to a tarball's name TGZ=${SAVE} fi - tar cf ${TGZ} -C ${EESSI_TMPDIR} . + tar czf ${TGZ} -C ${EESSI_TMPDIR} . echo "Saved contents of tmp directory '${EESSI_TMPDIR}' to tarball '${TGZ}' (to resume session add '--resume ${TGZ}')" fi From b201c533c2271f6b4815661850570c26576e120c Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 18 Sep 2024 21:26:17 +0200 Subject: [PATCH 2/8] Added CUDA-12.1.1 --- .../2023.06/eessi-2023.06-eb-4.9.3-001-system-CUDA.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-001-system-CUDA.yml diff --git a/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-001-system-CUDA.yml b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-001-system-CUDA.yml new file mode 100644 index 0000000000..630bf6aa25 --- /dev/null +++ b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-001-system-CUDA.yml @@ -0,0 +1,2 @@ +easyconfigs: + - CUDA-12.1.1.eb From e8f92f62f83c5c939467edb863c995e829a808d1 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 18 Sep 2024 21:54:24 +0200 Subject: [PATCH 3/8] Rebuild CUDA in accelerator prefix --- .../2023.06/eessi-2023.06-eb-4.9.3-001-system-CUDA.yml | 2 -- .../20240918-eb-4.9.3-CUDA-12.1.1-in-accel-prefix.yml | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-001-system-CUDA.yml create mode 100644 easystacks/software.eessi.io/2023.06/rebuilds/20240918-eb-4.9.3-CUDA-12.1.1-in-accel-prefix.yml diff --git a/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-001-system-CUDA.yml b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-001-system-CUDA.yml deleted file mode 100644 index 630bf6aa25..0000000000 --- a/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-001-system-CUDA.yml +++ /dev/null @@ -1,2 +0,0 @@ -easyconfigs: - - CUDA-12.1.1.eb diff --git a/easystacks/software.eessi.io/2023.06/rebuilds/20240918-eb-4.9.3-CUDA-12.1.1-in-accel-prefix.yml b/easystacks/software.eessi.io/2023.06/rebuilds/20240918-eb-4.9.3-CUDA-12.1.1-in-accel-prefix.yml new file mode 100644 index 0000000000..755bea096e --- /dev/null +++ b/easystacks/software.eessi.io/2023.06/rebuilds/20240918-eb-4.9.3-CUDA-12.1.1-in-accel-prefix.yml @@ -0,0 +1,7 @@ +# 2024.09.18 +# We need to reinstall CUDA in the accelerator prefixes +# See https://github.com/EESSI/software-layer/pull/720 +easyconfigs: + - CUDA-12.1.1.eb: + options: + accept-eula-for: CUDA From 78fbc1e86412379e382e473f36bf7ae98b1613e2 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 18 Sep 2024 22:17:47 +0200 Subject: [PATCH 4/8] make sure removal script also takes software prefix into account --- EESSI-remove-software.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/EESSI-remove-software.sh b/EESSI-remove-software.sh index 446a156cb8..e435dd8088 100755 --- a/EESSI-remove-software.sh +++ b/EESSI-remove-software.sh @@ -79,6 +79,17 @@ echo ">> Setting up \$MODULEPATH..." module --force purge # ignore current $MODULEPATH entirely module unuse $MODULEPATH + +# if an accelerator target is specified, we need to make sure that the CPU-only modules are also still available +if [ ! -z ${EESSI_ACCELERATOR_TARGET} ]; then + CPU_ONLY_MODULES_PATH=$(echo $EASYBUILD_INSTALLPATH | sed "s@/accel/${EESSI_ACCELERATOR_TARGET}@@g")/modules/all + if [ -d ${CPU_ONLY_MODULES_PATH} ]; then + module use ${CPU_ONLY_MODULES_PATH} + else + fatal_error "Derived path to CPU-only modules does not exist: ${CPU_ONLY_MODULES_PATH}" + fi +fi + module use $EASYBUILD_INSTALLPATH/modules/all if [[ -z ${MODULEPATH} ]]; then fatal_error "Failed to set up \$MODULEPATH?!" From 20b65e67e633f68f49c9beb5129d03043aee6ad6 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 18 Sep 2024 23:01:49 +0200 Subject: [PATCH 5/8] Make sure we remove from where the module is really located - and not just assume that it's in EASYBUILD_INSTALLPATH --- EESSI-remove-software.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/EESSI-remove-software.sh b/EESSI-remove-software.sh index e435dd8088..25593b5a79 100755 --- a/EESSI-remove-software.sh +++ b/EESSI-remove-software.sh @@ -120,8 +120,12 @@ if [ $EUID -eq 0 ]; then # * [R] $CFGS/s/someapp/someapp-someversion.eb (module: someapp/someversion) rebuild_apps=$(eb --allow-use-as-root-and-accept-consequences --dry-run-short --rebuild --easystack ${easystack_file} | grep "^ \* \[R\]" | grep -o "module: .*[^)]" | awk '{print $2}') for app in ${rebuild_apps}; do - app_dir=${EASYBUILD_INSTALLPATH}/software/${app} - app_module=${EASYBUILD_INSTALLPATH}/modules/all/${app}.lua + # Returns e.g. /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen2/modules/all: + app_modulepath=$(module --terse av ${app} 2>&1 | head -n 1 | sed 's/://') + # Two dirname invocations, so returns e.g. /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen2 + app_installprefix=$(dirname $(dirname app_modulpath)) + app_dir=${app_installprefix}/software/${app} + app_module=${app_installprefix}/modules/all/${app}.lua echo_yellow "Removing ${app_dir} and ${app_module}..." rm -rf ${app_dir} rm -rf ${app_module} From 4b3612dc807edc3988eb2d1727a812afcd751d7e Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 18 Sep 2024 23:11:35 +0200 Subject: [PATCH 6/8] Fix typo --- EESSI-remove-software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-remove-software.sh b/EESSI-remove-software.sh index 25593b5a79..05572257a5 100755 --- a/EESSI-remove-software.sh +++ b/EESSI-remove-software.sh @@ -123,7 +123,7 @@ if [ $EUID -eq 0 ]; then # Returns e.g. /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen2/modules/all: app_modulepath=$(module --terse av ${app} 2>&1 | head -n 1 | sed 's/://') # Two dirname invocations, so returns e.g. /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen2 - app_installprefix=$(dirname $(dirname app_modulpath)) + app_installprefix=$(dirname $(dirname ${app_modulepath})) app_dir=${app_installprefix}/software/${app} app_module=${app_installprefix}/modules/all/${app}.lua echo_yellow "Removing ${app_dir} and ${app_module}..." From 4f732776fc96e1a779ffb053bd0937137ef6c020 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Thu, 19 Sep 2024 07:05:37 +0200 Subject: [PATCH 7/8] Limit this PR to only the EESSI-remove-software.sh change --- .../20240918-eb-4.9.3-CUDA-12.1.1-in-accel-prefix.yml | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 easystacks/software.eessi.io/2023.06/rebuilds/20240918-eb-4.9.3-CUDA-12.1.1-in-accel-prefix.yml diff --git a/easystacks/software.eessi.io/2023.06/rebuilds/20240918-eb-4.9.3-CUDA-12.1.1-in-accel-prefix.yml b/easystacks/software.eessi.io/2023.06/rebuilds/20240918-eb-4.9.3-CUDA-12.1.1-in-accel-prefix.yml deleted file mode 100644 index 755bea096e..0000000000 --- a/easystacks/software.eessi.io/2023.06/rebuilds/20240918-eb-4.9.3-CUDA-12.1.1-in-accel-prefix.yml +++ /dev/null @@ -1,7 +0,0 @@ -# 2024.09.18 -# We need to reinstall CUDA in the accelerator prefixes -# See https://github.com/EESSI/software-layer/pull/720 -easyconfigs: - - CUDA-12.1.1.eb: - options: - accept-eula-for: CUDA From 6d8ff958be445f3e46f74526614cc0c3c61981ee Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Thu, 19 Sep 2024 08:43:42 +0200 Subject: [PATCH 8/8] Fix creation of tarball, since grep doesn't match (and thus returns non-zero exit code) for the CPU prefix if nothing got build there --- create_tarball.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/create_tarball.sh b/create_tarball.sh index e70a9b18d6..9c212681a5 100755 --- a/create_tarball.sh +++ b/create_tarball.sh @@ -64,9 +64,9 @@ for subdir in ${cpu_arch_subdir} ${cpu_arch_subdir}/accel/${accel_subdir}; do if [ -d ${eessi_version}/software/${os}/${subdir}/modules ]; then # module files - find ${eessi_version}/software/${os}/${subdir}/modules -type f | grep -v '/\.wh\.' >> ${files_list} + find ${eessi_version}/software/${os}/${subdir}/modules -type f | grep -v '/\.wh\.' >> ${files_list} || true # Make sure we don't exit because of set -e if grep doesn't return a match # module symlinks - find ${eessi_version}/software/${os}/${subdir}/modules -type l | grep -v '/\.wh\.' >> ${files_list} + find ${eessi_version}/software/${os}/${subdir}/modules -type l | grep -v '/\.wh\.' >> ${files_list} || true # Make sure we don't exit because of set -e if grep doesn't return a match # module files and symlinks find ${eessi_version}/software/${os}/${subdir}/modules/all -type f -o -type l \ | grep -v '/\.wh\.' | grep -v '/\.modulerc\.lua' | sed -e 's/.lua$//' | sed -e 's@.*/modules/all/@@g' | sort -u \ @@ -83,7 +83,7 @@ for subdir in ${cpu_arch_subdir} ${cpu_arch_subdir}/accel/${accel_subdir}; do for package_version in $(cat ${module_files_list}); do echo "handling ${package_version}" ls -d ${eessi_version}/software/${os}/${subdir}/software/${package_version} \ - | grep -v '/\.wh\.' >> ${files_list} + | grep -v '/\.wh\.' >> ${files_list} || true # Make sure we don't exit because of set -e if grep doesn't return a match done fi done