elpa: new version and recipe tuning (#44749)
Add version 2024.03.001 and fix #43902. --------- Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
This commit is contained in:
parent
9c31ff74c4
commit
5e8f9ed1c7
@ -24,6 +24,9 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
|
|||||||
|
|
||||||
version("master", branch="master")
|
version("master", branch="master")
|
||||||
|
|
||||||
|
version(
|
||||||
|
"2024.03.001", sha256="41c6cbf56d2dac26443faaba8a77307d261bf511682a64b96e24def77c813622"
|
||||||
|
)
|
||||||
version(
|
version(
|
||||||
"2023.11.001-patched",
|
"2023.11.001-patched",
|
||||||
sha256="62ee109afc06539507f459c08b958dc4db65b757dbd77f927678c77f7687415e",
|
sha256="62ee109afc06539507f459c08b958dc4db65b757dbd77f927678c77f7687415e",
|
||||||
@ -48,11 +51,18 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
|
|||||||
|
|
||||||
variant("openmp", default=True, description="Activates OpenMP support")
|
variant("openmp", default=True, description="Activates OpenMP support")
|
||||||
variant("mpi", default=True, description="Activates MPI support")
|
variant("mpi", default=True, description="Activates MPI support")
|
||||||
variant("gpu_streams", default=True, description="Activates GPU streams support")
|
|
||||||
|
with when("@2021.11.001:"):
|
||||||
|
variant(
|
||||||
|
"autotune", default=False, description="Enables autotuning for matrix restribution"
|
||||||
|
)
|
||||||
|
variant(
|
||||||
|
"gpu_streams", default=True, when="+cuda", description="Activates GPU streams support"
|
||||||
|
)
|
||||||
|
|
||||||
patch("fujitsu.patch", when="%fj")
|
patch("fujitsu.patch", when="%fj")
|
||||||
|
|
||||||
depends_on("autoconf", type="build", when="@master")
|
depends_on("autoconf@2.71:", type="build", when="@master")
|
||||||
depends_on("automake", type="build", when="@master")
|
depends_on("automake", type="build", when="@master")
|
||||||
|
|
||||||
depends_on("blas")
|
depends_on("blas")
|
||||||
@ -62,12 +72,20 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
|
|||||||
depends_on("rocblas", when="+rocm")
|
depends_on("rocblas", when="+rocm")
|
||||||
depends_on("libtool", type="build")
|
depends_on("libtool", type="build")
|
||||||
depends_on("python@3:", type="build")
|
depends_on("python@3:", type="build")
|
||||||
|
depends_on("scalapack", when="+autotune")
|
||||||
|
|
||||||
with when("@2021.11.01:"):
|
# Force openmp propagation on some providers of blas/lapack, as adviced by docs
|
||||||
variant(
|
# https://gitlab.mpcdf.mpg.de/elpa/elpa/-/blob/master/documentation/PERFORMANCE_TUNING.md?ref_type=heads#builds-with-openmp-enabled
|
||||||
"autotune", default=False, description="Enables autotuning for matrix restribution"
|
with when("+openmp"):
|
||||||
|
requires("^openblas threads=openmp", when="^[virtuals=blas,lapack] openblas")
|
||||||
|
requires("^intel-mkl threads=openmp", when="^[virtuals=blas,lapack] intel-mkl")
|
||||||
|
requires(
|
||||||
|
"^intel-oneapi-mkl threads=openmp", when="^[virtuals=blas,lapack] intel-oneapi-mkl"
|
||||||
|
)
|
||||||
|
requires(
|
||||||
|
"^intel-parallel-studio threads=openmp",
|
||||||
|
when="^[virtuals=blas,lapack] intel-parallel-studio",
|
||||||
)
|
)
|
||||||
depends_on("scalapack", when="+autotune")
|
|
||||||
|
|
||||||
# fails to build due to broken type-bound procedures in OMP parallel regions
|
# fails to build due to broken type-bound procedures in OMP parallel regions
|
||||||
conflicts(
|
conflicts(
|
||||||
@ -76,10 +94,9 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
|
|||||||
msg="ELPA-2021.05.001+ requires GCC-8+ for OpenMP support",
|
msg="ELPA-2021.05.001+ requires GCC-8+ for OpenMP support",
|
||||||
)
|
)
|
||||||
conflicts("+mpi", when="+rocm", msg="ROCm support and MPI are not yet compatible")
|
conflicts("+mpi", when="+rocm", msg="ROCm support and MPI are not yet compatible")
|
||||||
|
|
||||||
conflicts(
|
conflicts(
|
||||||
"+gpu_streams",
|
"+gpu_streams",
|
||||||
when="+openmp",
|
when="@:2023.11.001-patched +openmp",
|
||||||
msg="GPU streams currently not supported in combination with OpenMP",
|
msg="GPU streams currently not supported in combination with OpenMP",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -193,14 +210,9 @@ def configure_args(self):
|
|||||||
options += self.enable_or_disable("openmp")
|
options += self.enable_or_disable("openmp")
|
||||||
|
|
||||||
# Additional linker search paths and link libs
|
# Additional linker search paths and link libs
|
||||||
ldflags = [spec["blas"].libs.search_flags, spec["lapack"].libs.search_flags]
|
ldflags = [spec["blas"].libs.search_flags, spec["lapack"].libs.search_flags, "-lstdc++"]
|
||||||
libs = [spec["lapack"].libs.link_flags, spec["blas"].libs.link_flags]
|
libs = [spec["lapack"].libs.link_flags, spec["blas"].libs.link_flags]
|
||||||
|
|
||||||
# If using blas with openmp support, link with openmp
|
|
||||||
# Needed for Spack-provided OneAPI MKL and for many externals
|
|
||||||
if self.spec["blas"].satisfies("threads=openmp"):
|
|
||||||
ldflags.append(self.compiler.openmp_flag)
|
|
||||||
|
|
||||||
options += [f'LDFLAGS={" ".join(ldflags)}', f'LIBS={" ".join(libs)}']
|
options += [f'LDFLAGS={" ".join(ldflags)}', f'LIBS={" ".join(libs)}']
|
||||||
|
|
||||||
if "+mpi" in self.spec:
|
if "+mpi" in self.spec:
|
||||||
|
Loading…
Reference in New Issue
Block a user