Skip to content

Commit

Permalink
Use EESSI_ACCELERATOR_TARGET rather than regex
Browse files Browse the repository at this point in the history
  • Loading branch information
ocaisa committed Sep 24, 2024
1 parent dfe71c7 commit 087b7d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,9 @@ def post_sanitycheck_cuda(self, *args, **kwargs):
host_inj_path = full_path.replace('versions', 'host_injections')
# CUDA itself doesn't care about compute capability so remove this duplication from
# under host_injections
host_inj_path = re.sub(r"accel/nvidia/cc\d+/", '', host_inj_path)
accel_subdir = os.getenv("EESSI_ACCELERATOR_TARGET")
if accel_subdir:
host_inj_path = host_inj_path.replace('/accel/%s' % accel_subdir, 'host_injections')
# make sure source and target of symlink are not the same
if full_path == host_inj_path:
raise EasyBuildError("Source (%s) and target (%s) are the same location, are you sure you "
Expand Down

0 comments on commit 087b7d7

Please sign in to comment.