ELPA: Linking fixes for BLAS and OpenMP (#42747)
Co-authored-by: Phil Tooley <phil.tooley@amd.com>
This commit is contained in:
parent
3ebaf33915
commit
28d25affcc
@ -176,16 +176,16 @@ def configure_args(self):
|
|||||||
|
|
||||||
options += self.enable_or_disable("openmp")
|
options += self.enable_or_disable("openmp")
|
||||||
|
|
||||||
# if using mkl with openmp support, link with openmp
|
# Additional linker search paths and link libs
|
||||||
mkl_openmp_flag = (
|
ldflags = [spec["blas"].libs.search_flags, spec["lapack"].libs.search_flags]
|
||||||
self.compiler.openmp_flag
|
libs = [spec["lapack"].libs.link_flags, spec["blas"].libs.link_flags]
|
||||||
if self.spec.satisfies("^intel-oneapi-mkl threads=openmp")
|
|
||||||
else ""
|
# If using blas with openmp support, link with openmp
|
||||||
)
|
# Needed for Spack-provided OneAPI MKL and for many externals
|
||||||
options += [
|
if self.spec["blas"].satisfies("threads=openmp"):
|
||||||
"LDFLAGS={0} {1}".format(mkl_openmp_flag, spec["lapack"].libs.search_flags),
|
ldflags.append(self.compiler.openmp_flag)
|
||||||
"LIBS={0} {1}".format(spec["lapack"].libs.link_flags, spec["blas"].libs.link_flags),
|
|
||||||
]
|
options += [f'LDFLAGS={" ".join(ldflags)}', f'LIBS={" ".join(libs)}']
|
||||||
|
|
||||||
if "+mpi" in self.spec:
|
if "+mpi" in self.spec:
|
||||||
options += [
|
options += [
|
||||||
|
Loading…
Reference in New Issue
Block a user