Skip to content

Commit f50b063

Browse files
authored
Merge pull request #67 from boegel/combo_pr65_pr66
fix condition in EESSI-extend + fix tarball naming for CPU-only tarballs
2 parents 4f8480b + 305f3db commit f50b063

File tree

3 files changed

+34
-25
lines changed

3 files changed

+34
-25
lines changed

EESSI-extend-easybuild.eb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,11 @@ easybuild_version = os.getenv("EBVERSIONEASYBUILD") or easybuild_version
212212
eessi_version = os.getenv("EESSI_VERSION") or "2023.06"
213213
214214
-- Set environment variables that are EasyBuild version specific
215-
if convertToCanonical(easybuild_version) > convertToCanonical("4") then
215+
-- Do unload unconditionally, so that even if EB versions were switched in the meantime, this gets unset
216+
-- This avoids issues where EESSI-extend is first loaded with EB => 5.1 (which set these vars)
217+
-- but then EB is swapped for a version < 5.1 and then EESSI-extend is unloaded (which would not unset
218+
-- these vars if we did it conditional on the EB version)
219+
if convertToCanonical(easybuild_version) >= convertToCanonical("5.1") or mode() == "unload" then
216220
setenv ("EASYBUILD_STRICT_RPATH_SANITY_CHECK", "1")
217221
setenv ("EASYBUILD_CUDA_SANITY_CHECK_ERROR_ON_FAILED_CHECKS", "1")
218222
setenv ("EASYBUILD_FAIL_ON_MOD_FILES_GCCCORE", "1")

EESSI-install-software.sh

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -247,29 +247,6 @@ if [ ! -f ${_lmod_sitepackage_file} ]; then
247247
python3 ${TOPDIR}/create_lmodsitepackage.py ${_eessi_software_path}
248248
fi
249249

250-
# Install full CUDA SDK and cu* libraries in host_injections
251-
# (This is done *before* configuring EasyBuild as it may rely on an older EB version)
252-
# Hardcode this for now, see if it works
253-
# TODO: We should make a nice yaml and loop over all CUDA versions in that yaml to figure out what to install
254-
# Allow skipping CUDA SDK install in e.g. CI environments
255-
echo "Going to install full CUDA SDK and cu* libraries under host_injections if necessary"
256-
temp_install_storage=${TMPDIR}/temp_install_storage
257-
mkdir -p ${temp_install_storage}
258-
if [ -z "${skip_cuda_install}" ] || [ ! "${skip_cuda_install}" ]; then
259-
${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh \
260-
-t ${temp_install_storage} \
261-
--accept-cuda-eula \
262-
--accept-cudnn-eula
263-
else
264-
echo "Skipping installation of CUDA SDK and cu* libraries in host_injections, since the --skip-cuda-install flag was passed"
265-
fi
266-
267-
# Install NVIDIA drivers in host_injections (if they exist)
268-
if nvidia_gpu_available; then
269-
echo "Installing NVIDIA drivers for use in prefix shell..."
270-
${EESSI_PREFIX}/scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh
271-
fi
272-
273250
echo ">> Configuring EasyBuild..."
274251

275252
# Make sure EESSI-extend is not loaded, and configure location variables for a
@@ -316,6 +293,30 @@ echo "DEBUG: before loading EESSI-extend // EASYBUILD_INSTALLPATH='${EASYBUILD_I
316293
source $TOPDIR/load_eessi_extend_module.sh ${EESSI_VERSION}
317294
echo "DEBUG: after loading EESSI-extend // EASYBUILD_INSTALLPATH='${EASYBUILD_INSTALLPATH}'"
318295

296+
# Install full CUDA SDK and cu* libraries in host_injections
297+
# (This is done *before* configuring EasyBuild as it may rely on an older EB version)
298+
# Hardcode this for now, see if it works
299+
# TODO: We should make a nice yaml and loop over all CUDA versions in that yaml to figure out what to install
300+
# Allow skipping CUDA SDK install in e.g. CI environments
301+
echo "Going to install full CUDA SDK and cu* libraries under host_injections if necessary"
302+
temp_install_storage=${TMPDIR}/temp_install_storage
303+
mkdir -p ${temp_install_storage}
304+
if [ -z "${skip_cuda_install}" ] || [ ! "${skip_cuda_install}" ]; then
305+
${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh \
306+
-t ${temp_install_storage} \
307+
--accept-cuda-eula \
308+
--accept-cudnn-eula
309+
else
310+
echo "Skipping installation of CUDA SDK and cu* libraries in host_injections, since the --skip-cuda-install flag was passed"
311+
fi
312+
313+
# Install NVIDIA drivers in host_injections (if they exist)
314+
if nvidia_gpu_available; then
315+
echo "Installing NVIDIA drivers for use in prefix shell..."
316+
${EESSI_PREFIX}/scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh
317+
fi
318+
319+
319320
if [ ! -z "${shared_fs_path}" ]; then
320321
shared_eb_sourcepath=${shared_fs_path}/easybuild/sources
321322
echo ">> Using ${shared_eb_sourcepath} as shared EasyBuild source path"

bot/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,11 @@ source $software_layer_dir/init/eessi_defaults
271271
# append the project (subdirectory) name to the end tarball name. This is information
272272
# then used at the ingestion stage. If ${EESSI_DEV_PROJECT} is not defined, nothing is
273273
# appended
274-
export TGZ=$(printf "eessi-%s-software-%s-%s-%s-%b%d.tar.gz" ${EESSI_VERSION} ${EESSI_OS_TYPE} ${EESSI_SOFTWARE_SUBDIR_OVERRIDE//\//-} ${EESSI_ACCELERATOR_TARGET_OVERRIDE//\//-} ${EESSI_DEV_PROJECT:+$EESSI_DEV_PROJECT-} ${timestamp})
274+
if [[ -z ${EESSI_ACCELERATOR_TARGET_OVERRIDE} ]]; then
275+
export TGZ=$(printf "eessi-%s-software-%s-%s-%b%d.tar.gz" ${EESSI_VERSION} ${EESSI_OS_TYPE} ${EESSI_SOFTWARE_SUBDIR_OVERRIDE//\//-} ${EESSI_DEV_PROJECT:+$EESSI_DEV_PROJECT-} ${timestamp})
276+
else
277+
export TGZ=$(printf "eessi-%s-software-%s-%s-%s-%b%d.tar.gz" ${EESSI_VERSION} ${EESSI_OS_TYPE} ${EESSI_SOFTWARE_SUBDIR_OVERRIDE//\//-} ${EESSI_ACCELERATOR_TARGET_OVERRIDE//\//-} ${EESSI_DEV_PROJECT:+$EESSI_DEV_PROJECT-} ${timestamp})
278+
fi
275279

276280
# Export EESSI_DEV_PROJECT to use it (if needed) when making tarball
277281
echo "bot/build.sh: EESSI_DEV_PROJECT='${EESSI_DEV_PROJECT}'"

0 commit comments

Comments
 (0)