summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-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):