intel-oneapi-mkl: linking with the +cluster variant is broken for external mkl (#39343)
* Update package.py Adding `mpi` variant to deal with external oneapi-mkl usage per #38238. * style conformance * accept both mpi specification mechanisms * style conformance * Update package.py * Update var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py Co-authored-by: Robert Cohn <rscohn2@gmail.com> * rename mpi variant mpi_family * style conformance * update help message for mpi_family --------- Co-authored-by: Robert Cohn <rscohn2@gmail.com>
This commit is contained in:
parent
7968cb7fa2
commit
b8bfaf65bf
@ -103,6 +103,14 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage):
|
||||
variant(
|
||||
"cluster", default=False, description="Build with cluster support: scalapack, blacs, etc"
|
||||
)
|
||||
variant(
|
||||
"mpi_family",
|
||||
default="none",
|
||||
values=("none", "mpich", "openmpi"),
|
||||
description="MPI family",
|
||||
multi=False,
|
||||
)
|
||||
|
||||
variant(
|
||||
"threads",
|
||||
default="none",
|
||||
@ -184,16 +192,23 @@ def _find_mkl_libs(self, shared):
|
||||
if self.spec.satisfies("+cluster"):
|
||||
if any(
|
||||
self.spec.satisfies(m)
|
||||
for m in ["^intel-oneapi-mpi", "^intel-mpi", "^mpich", "^cray-mpich"]
|
||||
for m in [
|
||||
"^intel-oneapi-mpi",
|
||||
"^intel-mpi",
|
||||
"^mpich",
|
||||
"^cray-mpich",
|
||||
"mpi_family=mpich",
|
||||
]
|
||||
):
|
||||
libs.append(self._xlp64_lib("libmkl_blacs_intelmpi"))
|
||||
elif self.spec.satisfies("^openmpi"):
|
||||
elif any(self.spec.satisfies(m) for m in ["^openmpi", "mpi_family=openmpi"]):
|
||||
libs.append(self._xlp64_lib("libmkl_blacs_openmpi"))
|
||||
else:
|
||||
raise RuntimeError(
|
||||
(
|
||||
"intel-oneapi-mpi +cluster requires one of "
|
||||
"^intel-oneapi-mpi, ^intel-mpi, ^mpich, or ^openmpi"
|
||||
"intel-oneapi-mpi +cluster requires one of ^intel-oneapi-mpi, "
|
||||
"^intel-mpi, ^mpich, ^cray-mpich, mpi_family=mpich, ^openmpi, "
|
||||
"or mpi_family=openmpi"
|
||||
)
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user