summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Vanderwende <vanderwb@ucar.edu>2023-09-28 04:52:22 -0600
committerGitHub <noreply@github.com>2023-09-28 06:52:22 -0400
commitfba47e87d7ff3fd387ee07e13b8c420090d2d661 (patch)
tree2e15fcef13f4df0430d780fed7802d73a9f8c5a7
parentbf8e8d9f5f7f5456edddd0deaceb9a59fe1eba3e (diff)
downloadspack-fba47e87d7ff3fd387ee07e13b8c420090d2d661.tar.gz
spack-fba47e87d7ff3fd387ee07e13b8c420090d2d661.tar.bz2
spack-fba47e87d7ff3fd387ee07e13b8c420090d2d661.tar.xz
spack-fba47e87d7ff3fd387ee07e13b8c420090d2d661.zip
Support optional vars script arguments (#40064)
-rw-r--r--lib/spack/spack/build_systems/oneapi.py7
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py7
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/spack/spack/build_systems/oneapi.py b/lib/spack/spack/build_systems/oneapi.py
index fddbd3410c..1961eb312c 100644
--- a/lib/spack/spack/build_systems/oneapi.py
+++ b/lib/spack/spack/build_systems/oneapi.py
@@ -61,6 +61,11 @@ class IntelOneApiPackage(Package):
"""Path to component <prefix>/<component>/<version>."""
return self.prefix.join(join_path(self.component_dir, self.spec.version))
+ @property
+ def env_script_args(self):
+ """Additional arguments to pass to vars.sh script."""
+ return ()
+
def install(self, spec, prefix):
self.install_component(basename(self.url_for_version(spec.version)))
@@ -124,7 +129,7 @@ class IntelOneApiPackage(Package):
if "~envmods" not in self.spec:
env.extend(
EnvironmentModifications.from_sourcing_file(
- join_path(self.component_prefix, "env", "vars.sh")
+ join_path(self.component_prefix, "env", "vars.sh"), *self.env_script_args
)
)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py
index 5651544401..fab6c8ca1f 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py
@@ -111,6 +111,13 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage):
def component_dir(self):
return "mpi"
+ @property
+ def env_script_args(self):
+ if "+external-libfabric" in self.spec:
+ return ("-i_mpi_ofi_internal=0",)
+ else:
+ return ()
+
def setup_dependent_package(self, module, dep_spec):
if "+generic-names" in self.spec:
self.spec.mpicc = join_path(self.component_prefix.bin, "mpicc")