Update cp2k recipe (#39128)

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>
Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
This commit is contained in:
Taillefumier Mathieu 2023-08-21 17:09:28 +02:00 committed by GitHub
parent 5389db821d
commit 8def75b414
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 4 deletions

View file

@ -33,6 +33,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
maintainers("dev-zero", "mtaillefumier")
version("2023.2", sha256="adbcc903c1a78cba98f49fe6905a62b49f12e3dfd7cedea00616d1a5f50550db")
version("2023.1", sha256="dff343b4a80c3a79363b805429bdb3320d3e1db48e0ff7d20a3dfd1c946a51ce")
version("2022.2", sha256="1a473dea512fe264bb45419f83de432d441f90404f829d89cbc3a03f723b8354")
version("2022.1", sha256="2c34f1a7972973c62d471cd35856f444f11ab22f2ff930f6ead20f3454fd228b")
@ -180,6 +181,11 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
depends_on("libxc@5.1.3:5.1", when="@8.2:8")
depends_on("libxc@5.1.7:5.1", when="@9:2022.2")
depends_on("libxc@6.1:", when="@2023.1:")
depends_on("libxc@6.2:", when="@2023.2:")
with when("+spla"):
depends_on("spla+cuda+fortran", when="+cuda")
depends_on("spla+rocm+fortran", when="+rocm")
with when("+mpi"):
depends_on("mpi@2:")
@ -191,6 +197,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
depends_on("cosma@2.5.1:", when="@9:")
depends_on("cosma@2.6.3:", when="@master:")
depends_on("cosma+cuda", when="+cuda")
depends_on("cosma+rocm", when="+rocm")
conflicts("~mpi")
# COSMA support was introduced in 8+
conflicts("@:7")
@ -201,6 +208,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
depends_on("elpa~openmp", when="~openmp")
depends_on("elpa@2021.05:", when="@8.3:")
depends_on("elpa@2021.11.001:", when="@9.1:")
depends_on("elpa@2023.05.001:", when="@2023.2:")
with when("+plumed"):
depends_on("plumed+shared")
@ -219,6 +227,8 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
# a consistent/compatible combination is pulled into the dependency graph.
with when("+sirius"):
depends_on("sirius+fortran+shared")
depends_on("sirius+cuda", when="+cuda")
depends_on("sirius+rocm", when="+rocm")
depends_on("sirius+openmp", when="+openmp")
depends_on("sirius~openmp", when="~openmp")
depends_on("sirius@:6", when="@:7")
@ -865,16 +875,20 @@ def cmake_args(self):
raise InstallError("CP2K supports only one cuda_arch at a time.")
else:
gpu_ver = gpu_map[spec.variants["cuda_arch"].value[0]]
args += ["-DCP2K_USE_ACCEL=CUDA"]
args += [self.define("CP2K_WITH_GPU", gpu_ver)]
args += [
self.define("CP2K_USE_ACCEL", "CUDA"),
self.define("CP2K_WITH_GPU", gpu_ver),
]
if "+rocm" in spec:
if len(spec.variants["amdgpu_target"].value) > 1:
raise InstallError("CP2K supports only one amdgpu_target at a time.")
else:
gpu_ver = gpu_map[spec.variants["amdgpu_target"].value[0]]
args += ["-DCP2K_USE_ACCEL=HIP"]
args += [self.define("CP2K_WITH_GPU", gpu_ver)]
args += [
self.define("CP2K_USE_ACCEL", "HIP"),
self.define("CP2K_WITH_GPU", gpu_ver),
]
args += [
self.define_from_variant("CP2K_ENABLE_REGTESTS", "enable_regtests"),

View file

@ -13,6 +13,9 @@ class Libxc(AutotoolsPackage, CudaPackage):
homepage = "https://tddft.org/programs/libxc/"
url = "https://gitlab.com/libxc/libxc/-/archive/6.1.0/libxc-6.1.0.tar.gz"
version("6.2.2", sha256="3b0523924579cf494cafc6fea92945257f35692b004217d3dfd3ea7ca780e8dc")
version("6.2.1", sha256="b5f3b4514db6bc4ccda1da90ac6176ea1f82e12241cc66427c58cbc4a5197b9b")
version("6.2.0", sha256="3d25878782b5f94e7e4d41bd6de27f98983584cd0be0c65e69a9ada986b56b4d")
version("6.1.0", sha256="f593745fa47ebfb9ddc467aaafdc2fa1275f0d7250c692ce9761389a90dd8eaf")
version("6.0.0", sha256="0c774e8e195dd92800b9adf3df5f5721e29acfe9af4b191a9937c7de4f9aa9f6")
version("5.2.3", sha256="7b7a96d8eeb472c7b8cca7ac38eae27e0a8113ef44dae5359b0eb12592b4bcf2")