intel-oneapi-mkl: add threading support (#37586)

This commit is contained in:
Robert Cohn 2023-05-10 10:47:57 -04:00 committed by GitHub
parent e70755f692
commit 8eb1829554
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,6 +97,13 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage):
variant(
"cluster", default=False, description="Build with cluster support: scalapack, blacs, etc"
)
variant(
"threads",
default="none",
description="Multithreading support",
values=("openmp", "tbb", "none"),
multi=False,
)
depends_on("intel-oneapi-tbb")
# cluster libraries need mpi
@ -155,7 +162,16 @@ def _find_mkl_libs(self, shared):
if "+cluster" in self.spec:
libs.extend([self._xlp64_lib("libmkl_scalapack"), "libmkl_cdft_core"])
libs.extend([self._xlp64_lib("libmkl_intel"), "libmkl_sequential", "libmkl_core"])
libs.append(self._xlp64_lib("libmkl_intel"))
if "threads=tbb" in self.spec:
libs.append("libmkl_tbb_thread")
elif "threads=openmp" in self.spec:
libs.append("libmkl_intel_thread")
else:
libs.append("libmkl_sequential")
libs.append("libmkl_core")
if "+cluster" in self.spec:
libs.append(self._xlp64_lib("libmkl_blacs_intelmpi"))