summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Cohn <robert.s.cohn@intel.com>2023-09-11 09:47:52 -0400
committerGitHub <noreply@github.com>2023-09-11 15:47:52 +0200
commit2f633426771f64cc54d007d6f4004a7dad2ac81a (patch)
tree2d00dcaa0d01b1f7d0be71161b176f6126e80fb7
parent04eae7316f53bc3ee54ac7b57d4386f89bad3716 (diff)
downloadspack-2f633426771f64cc54d007d6f4004a7dad2ac81a.tar.gz
spack-2f633426771f64cc54d007d6f4004a7dad2ac81a.tar.bz2
spack-2f633426771f64cc54d007d6f4004a7dad2ac81a.tar.xz
spack-2f633426771f64cc54d007d6f4004a7dad2ac81a.zip
intel-oneapi-mkl: hpcx-mpi support (#39750)
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py
index f90a725ab4..2eef32fa14 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py
@@ -220,9 +220,14 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage):
resolved_libs = find_libraries(libs, lib_path, shared=shared)
# Add MPI libraries for cluster support. If MPI is not in the
# spec, then MKL is externally installed and application must
- # link with MPI libaries
- if self.spec.satisfies("+cluster ^mpi"):
- resolved_libs = resolved_libs + self.spec["mpi"].libs
+ # link with MPI libaries. If MPI is in spec, but there are no
+ # libraries, then the package (e.g. hpcx-mpi) relies on the
+ # compiler wrapper to add the libraries.
+ try:
+ if self.spec.satisfies("+cluster ^mpi"):
+ resolved_libs = resolved_libs + self.spec["mpi"].libs
+ except spack.error.NoLibrariesError:
+ pass
return resolved_libs
def _xlp64_lib(self, lib):