From 508d9c75d57ac4d7f41ce8499a4809bd2b50f9a8 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sun, 9 Feb 2025 21:25:14 +0100 Subject: [PATCH 1/3] {2023.06}[system,nvidia_grace_hopper] EasyBuild 4.8.2, 4.9.0, 4.9.1, 4.9.2, 4.9.3, 4.9.4 --- .../eessi-2023.06-eb-4.9.4-001-system.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 easystacks/software.eessi.io/2023.06/nvidia_grace_hopper/eessi-2023.06-eb-4.9.4-001-system.yml diff --git a/easystacks/software.eessi.io/2023.06/nvidia_grace_hopper/eessi-2023.06-eb-4.9.4-001-system.yml b/easystacks/software.eessi.io/2023.06/nvidia_grace_hopper/eessi-2023.06-eb-4.9.4-001-system.yml new file mode 100644 index 0000000000..c92d62717b --- /dev/null +++ b/easystacks/software.eessi.io/2023.06/nvidia_grace_hopper/eessi-2023.06-eb-4.9.4-001-system.yml @@ -0,0 +1,10 @@ +easyconfigs: + - EasyBuild-4.8.2.eb + - EasyBuild-4.9.0.eb + - EasyBuild-4.9.1.eb + - EasyBuild-4.9.2.eb + - EasyBuild-4.9.3.eb + - EasyBuild-4.9.4.eb: + options: + # see https://github.com/easybuilders/easybuild-easyconfigs/pull/21465 + from-commit: 39cdebd7bd2cb4a9c170ee22439401316b2e7a25 From 918b4224d31a8ba8824ab51f3d1472f992323d52 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Mon, 10 Feb 2025 06:07:04 +0100 Subject: [PATCH 2/3] add a little debug info and use TMPDIR if it is defined --- bot/build.sh | 13 ++++++++++++- create_tarball.sh | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/bot/build.sh b/bot/build.sh index 29444a32c2..6bbf282bcd 100755 --- a/bot/build.sh +++ b/bot/build.sh @@ -93,7 +93,18 @@ 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}) +# We should have set TMPDIR via $LOCAL_TMP already in the bot's slurm script. +# To be sure, we test if TMPDIR is set and simply use that, otherwise we expand +# it here. +if [[ -n ${TMPDIR} && -d ${TMPDIR} ]]; then + # TMPDIR defined and directory exists + STORAGE=${TMPDIR} +else + if [[ -z ${TMPDIR} ]]; then + # TMPDIR not defined + STORAGE=$(envsubst <<< ${LOCAL_TMP}) + fi +fi echo "'${STORAGE}'" # make sure ${STORAGE} exists diff --git a/create_tarball.sh b/create_tarball.sh index 01f498e1ac..86160cb751 100755 --- a/create_tarball.sh +++ b/create_tarball.sh @@ -14,6 +14,10 @@ cpu_arch_subdir=$3 accel_subdir=$4 target_tgz=$5 +echo "create_tarball.sh: TMPDIR='${TMPDIR}'" +if [[ ! -z ${TMPDIR} ]]; then + ls -l ${TMPDIR} +fi tmpdir=`mktemp -d` echo ">> tmpdir: $tmpdir" From 35309d725bee3ac3b1a2cae64b2d7e5f9c3b4f26 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Mon, 10 Feb 2025 06:28:58 +0100 Subject: [PATCH 3/3] add bind mount for TMPDIR if TMP_IN_CONTAINER is not a prefix of TMPDIR --- eessi_container.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eessi_container.sh b/eessi_container.sh index fc97f9877c..0908489b6d 100755 --- a/eessi_container.sh +++ b/eessi_container.sh @@ -382,6 +382,7 @@ else # note, (b) & (c) are automatically ensured by using 'mktemp -d --tmpdir' to # create a temporary directory if [[ ! -z ${STORAGE} ]]; then + [[ ${VERBOSE} -eq 1 ]] && echo "export TMPDIR=${STORAGE}" export TMPDIR=${STORAGE} # mktemp fails if TMPDIR does not exist, so let's create it mkdir -p ${TMPDIR} @@ -529,6 +530,14 @@ BIND_PATHS="${EESSI_CVMFS_VAR_LIB}:/var/lib/cvmfs,${EESSI_CVMFS_VAR_RUN}:/var/ru # provide a '/tmp' inside the container BIND_PATHS="${BIND_PATHS},${EESSI_TMPDIR}:${TMP_IN_CONTAINER}" + +# if TMPDIR is not empty and if TMP_IN_CONTAINER is not a prefix of TMPDIR, we need to add a bind mount for TMPDIR +if [[ ! -z ${TMPDIR} && ${TMP_IN_CONTAINER} != ${TMPDIR}* ]]; then + echo "TMPDIR is not empty (${TMPDIR}) and TMP_IN_CONTAINER (${TMP_IN_CONTAINER}) is not a prefix of TMPDIR: adding bind mount for TMPDIR" + BIND_PATHS="${BIND_PATHS},${TMPDIR}" +fi + +# add bind mount for extra bind paths if [[ ! -z ${EXTRA_BIND_PATHS} ]]; then BIND_PATHS="${BIND_PATHS},${EXTRA_BIND_PATHS}" fi