From cd982fb90846a3a73409d032bca16fab03b8706f Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 11 Mar 2026 10:13:53 +0100 Subject: [PATCH 1/3] Make the use of the required keyword conditional on the EB version --- eb_hooks.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index b730493e..1b517fdf 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -125,6 +125,19 @@ def print_warning(*args, **kwargs): orig_print_warning(*args, **kwargs) +def get_cuda_cc_string(self): + # required keyword was introduce in 5.1.1 + if EASYBUILD_VERSION >= '5.1.1': + cuda_ccs_string = self.cfg.get_cuda_cc_template_value('cuda_compute_capabilities', required=False) + # mimic the 'required=False' behavior pre-EB 5.1.1 + else: + try: + cuda_ccs_string = self.cfg.get_cuda_cc_template_value('cuda_compute_capabilities') + except: + cuda_ccs_string = '' + return cuda_ccs_string + + def is_gcccore_1220_based(**kwargs): # ecname, ecversion, tcname, tcversion): """ @@ -760,7 +773,7 @@ def is_unsupported_module(self): cudnn_ver = get_dependency_software_version("cuDNN", ec=self.cfg, check_deps=True, check_builddeps=True) if cudnn_ver: # cuda_ccs_string is e.g. "8.0,9.0" - cuda_ccs_string = self.cfg.get_cuda_cc_template_value('cuda_compute_capabilities', required=False) + cuda_ccs_string = get_cuda_cc_string(self) # cuda_ccs is empty if none are defined if cuda_ccs_string: # cuda_ccs is a comma-seperated string. Convert to list for easier handling @@ -788,7 +801,7 @@ def is_unsupported_module(self): cudaver = get_dependency_software_version("CUDA", ec=self.cfg, check_deps=True, check_builddeps=True) if cudaver: # cuda_ccs_string is e.g. "8.0,9.0" - cuda_ccs_string = self.cfg.get_cuda_cc_template_value('cuda_compute_capabilities', required=False) + cuda_ccs_string = get_cuda_cc_string(self) # cuda_ccs is empty if none are defined if cuda_ccs_string: # cuda_ccs is a comma-seperated string. Convert to list for easier handling From 2f025d088b0764a8c44d7697f4d5871f2176487d Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 11 Mar 2026 14:07:44 +0100 Subject: [PATCH 2/3] Move EESSI-extend unload up to avoid EASYBUILD_ config variables lingering that are not supported in older versions --- scripts/gpu_support/nvidia/install_cuda_and_libraries.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh b/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh index d575f505..144b5384 100755 --- a/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh +++ b/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh @@ -107,6 +107,8 @@ for EASYSTACK_FILE in ${TOPDIR}/easystacks/eessi-*CUDA*.yml; do echo_yellow ">> No EasyBuild/${eb_version} module found: skipping step to install easystack file ${easystack_file} (see output in ${module_avail_out})" continue fi + # Need to unload EESSI-extend before loading an EasyBuild version, as the unload behavior is dependent on the current EasyBuild version loaded + module unload EESSI-extend module load EasyBuild/${eb_version} # Make sure EESSI-extend does a site install here @@ -115,7 +117,6 @@ for EASYSTACK_FILE in ${TOPDIR}/easystacks/eessi-*CUDA*.yml; do unset EESSI_PROJECT_INSTALL unset EESSI_USER_INSTALL export EESSI_SITE_INSTALL=1 - module unload EESSI-extend ml_av_eessi_extend_out=${tmpdir}/ml_av_eessi_extend.out # need to use --ignore_cache to avoid the case that the module was removed (to be # rebuilt) but it is still in the cache and the rebuild failed From dc8f38733f687b8c701e35d452174986bdfb8cfd Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 11 Mar 2026 14:29:40 +0100 Subject: [PATCH 3/3] Clarify comment --- scripts/gpu_support/nvidia/install_cuda_and_libraries.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh b/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh index 144b5384..3421d686 100755 --- a/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh +++ b/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh @@ -107,7 +107,7 @@ for EASYSTACK_FILE in ${TOPDIR}/easystacks/eessi-*CUDA*.yml; do echo_yellow ">> No EasyBuild/${eb_version} module found: skipping step to install easystack file ${easystack_file} (see output in ${module_avail_out})" continue fi - # Need to unload EESSI-extend before loading an EasyBuild version, as the unload behavior is dependent on the current EasyBuild version loaded + # Safer to unload EESSI-extend before loading an EasyBuild version, in case unload behavior ever becomes dependent on EasyBuild version module unload EESSI-extend module load EasyBuild/${eb_version}