Skip to content

Commit

Permalink
Merge branch '2023.06-software.eessi.io' into pytorch_212_cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
Caspar van Leeuwen committed Sep 19, 2024
2 parents 3a3e36a + 9d08238 commit 87b3234
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
19 changes: 17 additions & 2 deletions EESSI-remove-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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?!"
Expand Down Expand Up @@ -109,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_modulepath}))
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}
Expand Down
6 changes: 3 additions & 3 deletions create_tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions eessi_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 87b3234

Please sign in to comment.