ELSI: add v2.11 and dlaf variant (#46317)
* provide dlaff libs * fix incompatibility with ntpoly * add cuda conflicts * [@spackbot] updating style on behalf of RMeli * Update var/spack/repos/builtin/packages/elsi/package.py Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com> * move pexsi conflict to context --------- Co-authored-by: RMeli <RMeli@users.noreply.github.com> Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>
This commit is contained in:
parent
128cac34e0
commit
8b18f95e05
@ -51,3 +51,9 @@ def cmake_args(self):
|
||||
args.append(self.define("MPIEXEC_MAX_NUMPROCS", 6))
|
||||
|
||||
return args
|
||||
|
||||
@property
|
||||
def libs(self):
|
||||
return find_libraries(
|
||||
"libDLAF_Fortran", root=self.home, shared=self.spec.satisfies("+shared")
|
||||
)
|
||||
|
@ -18,6 +18,7 @@ class Elsi(CMakePackage, CudaPackage):
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("2.11.0", sha256="2e6929827ed9c99a32381ed9da40482e862c28608d59d4f27db7dcbcaed1520d")
|
||||
version("2.10.1", sha256="b3c7526d46a9139a26680787172a3df15bc648715a35bdf384053231e94ab829")
|
||||
version(
|
||||
"2.2.1",
|
||||
@ -30,6 +31,8 @@ class Elsi(CMakePackage, CudaPackage):
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("fortran", type="build") # generated
|
||||
|
||||
generator("ninja")
|
||||
|
||||
variant(
|
||||
"add_underscore",
|
||||
default=True,
|
||||
@ -65,11 +68,12 @@ class Elsi(CMakePackage, CudaPackage):
|
||||
)
|
||||
variant(
|
||||
"internal_elpa_version",
|
||||
default="2024",
|
||||
values=("2024", "2023_11", "2023", "2021", "2020"),
|
||||
default="2020",
|
||||
values=("2020", "2021", conditional("2023", "2023_11", "2024", when="@:2.11")),
|
||||
description="Internal ELPA version",
|
||||
multi=False,
|
||||
)
|
||||
variant("dlaf", default=False, when="@2.11:", description="Enable DLA-Future support")
|
||||
|
||||
# Basic dependencies
|
||||
depends_on("blas", type="link")
|
||||
@ -78,7 +82,10 @@ class Elsi(CMakePackage, CudaPackage):
|
||||
depends_on("mpi")
|
||||
|
||||
# Library dependencies
|
||||
depends_on("ntpoly", when="+use_external_ntpoly")
|
||||
with when("+use_external_ntpoly"):
|
||||
depends_on("ntpoly")
|
||||
depends_on("ntpoly@3:", when="@2.11:")
|
||||
conflicts("^ntpoly@3:", when="@:2.10")
|
||||
with when("+use_external_elpa"):
|
||||
depends_on("elpa+cuda", when="+cuda")
|
||||
depends_on("elpa~cuda", when="~cuda")
|
||||
@ -94,9 +101,14 @@ class Elsi(CMakePackage, CudaPackage):
|
||||
depends_on("pexsi+fortran")
|
||||
depends_on("superlu-dist+cuda", when="+cuda")
|
||||
depends_on("superlu-dist~cuda", when="~cuda")
|
||||
conflicts("^pexsi@2:", when="@:2.11")
|
||||
with when("+use_external_omm"):
|
||||
depends_on("omm")
|
||||
depends_on("matrix-switch") # Direct dependency
|
||||
with when("+dlaf"):
|
||||
depends_on("dla-future-fortran")
|
||||
conflicts("dla-future~cuda", when="+cuda")
|
||||
conflicts("dla-future+cuda", when="~cuda")
|
||||
|
||||
def cmake_args(self):
|
||||
libs_names = ["scalapack", "lapack", "blas"]
|
||||
@ -114,6 +126,8 @@ def cmake_args(self):
|
||||
if self.spec.satisfies("+use_external_omm"):
|
||||
libs_names.append("omm")
|
||||
libs_names.append("matrix-switch")
|
||||
if self.spec.satisfies("+dlaf"):
|
||||
libs_names.append("dla-future-fortran")
|
||||
|
||||
lib_paths, inc_paths, libs = [], [], []
|
||||
for lib in libs_names:
|
||||
@ -140,6 +154,7 @@ def cmake_args(self):
|
||||
self.define_from_variant("ADD_UNDERSCORE", "add_underscore"),
|
||||
self.define_from_variant("ENABLE_PEXSI", "enable_pexsi"),
|
||||
self.define_from_variant("ENABLE_SIPS", "enable_sips"),
|
||||
self.define_from_variant("ENABLE_DLAF", "dlaf"),
|
||||
self.define_from_variant("USE_EXTERNAL_ELPA", "use_external_elpa"),
|
||||
self.define_from_variant("USE_EXTERNAL_NTPOLY", "use_external_ntpoly"),
|
||||
self.define_from_variant("USE_EXTERNAL_OMM", "use_external_omm"),
|
||||
@ -161,6 +176,10 @@ def cmake_args(self):
|
||||
if self.spec.variants["elpa2_kernel"].value != "none":
|
||||
args.append(self.define_from_variant("ELPA2_KERNEL", "elpa2_kernel"))
|
||||
|
||||
if self.spec.satisfies("^elpa+cuda"):
|
||||
elpa_gpu_string = "nvidia-gpu" if self.spec.satisfies("^elpa@2021:") else "gpu"
|
||||
args.append(self.define(ELSI_ELPA_GPU_STRING, elpa_gpu_string))
|
||||
|
||||
args.append(self.define("INC_PATHS", ";".join(set(inc_paths))))
|
||||
|
||||
# Only when using fujitsu compiler
|
||||
|
Loading…
Reference in New Issue
Block a user