diff --git a/EESSI-remove-software.sh b/EESSI-remove-software.sh index 1a03a7af98..612c4e45d5 100755 --- a/EESSI-remove-software.sh +++ b/EESSI-remove-software.sh @@ -116,9 +116,15 @@ if [ $EUID -eq 0 ]; then if [ -f ${easystack_file} ]; then echo_green "Software rebuild(s) requested in ${easystack_file}, so determining which existing installation have to be removed..." # we need to remove existing installation directories first, - # so let's figure out which modules have to be rebuilt by doing a dry-run and grepping "someapp/someversion" for the relevant lines (with [R]) + # so let's figure out which modules have to be rebuilt by doing a + # dry-run and grepping "someapp/someversion" for the relevant + # lines (with [R] or [F], the latter may be shown when the option + # --force is used) # * [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}') + # or + # * [F] $CFGS/s/someapp/someapp-someversion.eb (module: someapp/someversion) + eb --allow-use-as-root-and-accept-consequences --dry-run-short --rebuild --easystack ${easystack_file} + rebuild_apps=$(eb --allow-use-as-root-and-accept-consequences --dry-run-short --rebuild --easystack ${easystack_file} | grep "^ \* \[[FR]\]" | grep -o "module: .*[^)]" | awk '{print $2}') for app in ${rebuild_apps}; do # 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/://') diff --git a/easystacks/software.eessi.io/2023.06/accel/nvidia/eessi-2023.06-eb-4.9.4-2023a-CUDA.yml b/easystacks/software.eessi.io/2023.06/accel/nvidia/eessi-2023.06-eb-4.9.4-2023a-CUDA.yml index 873c19aa33..26ab9d97ec 100644 --- a/easystacks/software.eessi.io/2023.06/accel/nvidia/eessi-2023.06-eb-4.9.4-2023a-CUDA.yml +++ b/easystacks/software.eessi.io/2023.06/accel/nvidia/eessi-2023.06-eb-4.9.4-2023a-CUDA.yml @@ -1,3 +1,4 @@ easyconfigs: - CUDA-12.1.1.eb - cuDNN-8.9.2.26-CUDA-12.1.1.eb + - PyTorch-2.1.2-foss-2023a-CUDA-12.1.1.eb diff --git a/easystacks/software.eessi.io/2023.06/accel/nvidia/rebuilds/20241123-eb-4.9.4-CUDA-12.1.1-add-cupti-lib-dir.yml b/easystacks/software.eessi.io/2023.06/accel/nvidia/rebuilds/20241123-eb-4.9.4-CUDA-12.1.1-add-cupti-lib-dir.yml new file mode 100644 index 0000000000..b06806da22 --- /dev/null +++ b/easystacks/software.eessi.io/2023.06/accel/nvidia/rebuilds/20241123-eb-4.9.4-CUDA-12.1.1-add-cupti-lib-dir.yml @@ -0,0 +1,13 @@ +# 2024.11.23 +# We add extras/CUPTI/lib64 to LIBRRY_PATH or the rpath wrappers won't add this +# directory to the RPATH search path and executables/libraries depending on it +# may not find libraries in it. +easyconfigs: + - CUDA-12.1.1.eb: + # we need to force the rebuild because we still have CUDA under a non-accel + # directory available + # see https://github.com/easybuilders/easybuild-easyblocks/pull/3516 + options: + force: True + accept-eula-for: CUDA + include-easyblocks-from-commit: 5077104baf2e0c80d035ba65e5bca3e4d7ce30d1 diff --git a/eb_hooks.py b/eb_hooks.py index 03642656ea..d669fb51e0 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -217,6 +217,27 @@ def parse_hook_cgal_toolchainopts_precise(ec, eprefix): raise EasyBuildError("CGAL-specific hook triggered for non-CGAL easyconfig?!") +def parse_hook_cuda_prepend_path_cupti(ec, eprefix): + """Add prepend_path(LIBRARY_PATH, CUPTI lib dir) to modluafooter.""" + if ec.name == 'CUDA': + ec_dict = ec.asdict() + modluafooter = 'modluafooter' + cupti_lib_dir = os.path.join("extras", "CUPTI", "lib64") + extra_mod_footer_lines = [f'prepend_path("LIBRARY_PATH", pathJoin(root, "{cupti_lib_dir}"))'] + if modluafooter in ec_dict: + print_msg("parse_hook_cuda...: old modluafooter = '%s'", ec_dict[modluafooter]) + value = ec_dict[modluafooter] + for line in extra_mod_footer_lines: + if not line in value: + value = '\n'.join([value, line]) + ec[modluafooter] = value + else: + ec[modluafooter] = '\n'.join(extra_mod_footer_lines) + print_msg("parse_hook_cuda...: new modluafooter = '%s'", ec[modluafooter]) + else: + raise EasyBuildError("CUDA-specific hook triggered for non-CUDA easyconfig?!") + + def parse_hook_fontconfig_add_fonts(ec, eprefix): """Inject --with-add-fonts configure option for fontconfig.""" if ec.name == 'fontconfig': @@ -965,6 +986,7 @@ def inject_gpu_property(ec): PARSE_HOOKS = { 'casacore': parse_hook_casacore_disable_vectorize, 'CGAL': parse_hook_cgal_toolchainopts_precise, + # 'CUDA': parse_hook_cuda_prepend_path_cupti, 'fontconfig': parse_hook_fontconfig_add_fonts, 'FreeImage': parse_hook_freeimage_aarch64, 'grpcio': parse_hook_grpcio_zlib,