Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions EESSI-remove-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/://')
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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,
Expand Down
Loading