summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRocco Meli <r.meli@bluemail.ch>2023-10-25 12:13:32 +0200
committerGitHub <noreply@github.com>2023-10-25 04:13:32 -0600
commitf4bbc0dbd2747c2ebdf5ccbd366cc6d5e924ebf9 (patch)
treed7174c3c62cf03e20989215ba13c384275414d7b
parent1ecb100e433c075e619f1802f4f80c50ae348f36 (diff)
downloadspack-f4bbc0dbd2747c2ebdf5ccbd366cc6d5e924ebf9.tar.gz
spack-f4bbc0dbd2747c2ebdf5ccbd366cc6d5e924ebf9.tar.bz2
spack-f4bbc0dbd2747c2ebdf5ccbd366cc6d5e924ebf9.tar.xz
spack-f4bbc0dbd2747c2ebdf5ccbd366cc6d5e924ebf9.zip
Add dlaf variant to cp2k (#40702)
-rw-r--r--var/spack/repos/builtin/packages/cp2k/package.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py
index 27deecf784..2e765c7539 100644
--- a/var/spack/repos/builtin/packages/cp2k/package.py
+++ b/var/spack/repos/builtin/packages/cp2k/package.py
@@ -84,6 +84,13 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
when="@6.1:",
)
variant(
+ "dlaf",
+ default=False,
+ description="Enable DLA-Future eigensolver and Cholesky decomposition",
+ # TODO: Pin version when integrated in a release
+ when="@master build_system=cmake",
+ )
+ variant(
"sirius",
default=False,
description="Enable planewave electronic structure calculations via SIRIUS",
@@ -226,6 +233,15 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
depends_on("elpa@2021.11.001:", when="@9.1:")
depends_on("elpa@2023.05.001:", when="@2023.2:")
+ with when("+dlaf"):
+ conflicts(
+ "~mpi", msg="DLA-Future requires MPI. Only the distributed eigensolver is available."
+ )
+ depends_on("dla-future@0.2.1: +scalapack")
+ depends_on("dla-future ~cuda~rocm", when="~cuda~rocm")
+ depends_on("dla-future +cuda", when="+cuda")
+ depends_on("dla-future +rocm", when="+rocm")
+
with when("+plumed"):
depends_on("plumed+shared")
depends_on("plumed+mpi", when="+mpi")
@@ -945,6 +961,7 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
args += [
self.define_from_variant("CP2K_ENABLE_REGTESTS", "enable_regtests"),
self.define_from_variant("CP2K_USE_ELPA", "elpa"),
+ self.define_from_variant("CP2K_USE_DLAF", "dlaf"),
self.define_from_variant("CP2K_USE_LIBINT2", "libint"),
self.define_from_variant("CP2K_USE_SIRIUS", "sirius"),
self.define_from_variant("CP2K_USE_SPLA", "spla"),