|
32 | 32 |
|
33 | 33 | SYSTEM = EASYCONFIG_CONSTANTS['SYSTEM'][0] |
34 | 34 |
|
| 35 | +EESSI_INSTALLATION_REGEX = r"^/cvmfs/[^/]*.eessi.io/versions/" |
| 36 | +HOST_INJECTIONS_LOCATION = "/cvmfs/software.eessi.io/host_injections/" |
| 37 | + |
35 | 38 |
|
36 | 39 | def get_eessi_envvar(eessi_envvar): |
37 | 40 | """Get an EESSI environment variable from the environment""" |
@@ -419,7 +422,7 @@ def pre_configure_hook_extrae(self, *args, **kwargs): |
419 | 422 | # and problem due to use of which only pops up when running make ?! |
420 | 423 | self.cfg.update( |
421 | 424 | 'prebuildopts', |
422 | | - "cp config/mpi-macros.m4 config/mpi-macros.m4.orig &&" |
| 425 | + "cp config/mpi-macros.m4 config/mpi-macros.m4.orig && " |
423 | 426 | "sed -i 's/`which /`command -v /g' config/mpi-macros.m4 && " |
424 | 427 | ) |
425 | 428 | else: |
@@ -698,9 +701,7 @@ def post_postproc_cuda(self, *args, **kwargs): |
698 | 701 | """ |
699 | 702 |
|
700 | 703 | # We need to check if we are doing an EESSI-distributed installation |
701 | | - eessi_pattern = r"^/cvmfs/[^/]*.eessi.io/versions/" |
702 | | - host_injections_location = "/cvmfs/software.eessi.io/host_injections/" |
703 | | - eessi_installation = bool(re.search(eessi_pattern, self.installdir)) |
| 704 | + eessi_installation = bool(re.search(EESSI_INSTALLATION_REGEX, self.installdir)) |
704 | 705 |
|
705 | 706 | if self.name == 'CUDA' and eessi_installation: |
706 | 707 | print_msg("Replacing files in CUDA installation that we can not ship with symlinks to host_injections...") |
@@ -752,12 +753,12 @@ def post_postproc_cuda(self, *args, **kwargs): |
752 | 753 | # if it is not in the allowlist, delete the file and create a symlink to host_injections |
753 | 754 |
|
754 | 755 | # the host_injections path is under a fixed repo/location for CUDA |
755 | | - host_inj_path = re.sub(eessi_pattern, host_injections_location, full_path) |
| 756 | + host_inj_path = re.sub(EESSI_INSTALLATION_REGEX, HOST_INJECTIONS_LOCATION, full_path) |
756 | 757 | # CUDA itself doesn't care about compute capability so remove this duplication from |
757 | | - # under host_injections |
| 758 | + # under host_injections (symlink to a single CUDA installation for all compute |
| 759 | + # capabilities) |
758 | 760 | accel_subdir = os.getenv("EESSI_ACCELERATOR_TARGET") |
759 | 761 | if accel_subdir: |
760 | | - host_inj_path = host_inj_path.replace('/accel/%s' % accel_subdir, '') |
761 | 762 | host_inj_path = host_inj_path.replace("/accel/%s" % accel_subdir, '') |
762 | 763 | # make sure source and target of symlink are not the same |
763 | 764 | if full_path == host_inj_path: |
|
0 commit comments