CP2K: add version 2024.1 (#41933)

* ensure umpire~cuda~rocm when ~cuda~rocm

* cp2k-2024.1

* make cmake the default
This commit is contained in:
Rocco Meli 2024-01-12 20:43:14 +01:00 committed by GitHub
parent c84ce0e00c
commit 0e755608c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
periodic, material, crystal, and biological systems
"""
build_system(conditional("cmake", when="@2023.2:"), "makefile", default="makefile")
build_system(conditional("cmake", when="@2023.2:"), "makefile", default="cmake")
homepage = "https://www.cp2k.org"
url = "https://github.com/cp2k/cp2k/releases/download/v3.0.0/cp2k-3.0.tar.bz2"
@ -31,6 +31,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
license("GPL-2.0-or-later")
version("2024.1", sha256="a7abf149a278dfd5283dc592a2c4ae803b37d040df25d62a5e35af5c4557668f")
version("2023.2", sha256="adbcc903c1a78cba98f49fe6905a62b49f12e3dfd7cedea00616d1a5f50550db")
version("2023.1", sha256="dff343b4a80c3a79363b805429bdb3320d3e1db48e0ff7d20a3dfd1c946a51ce")
version("2022.2", sha256="1a473dea512fe264bb45419f83de432d441f90404f829d89cbc3a03f723b8354")
@ -89,8 +90,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
"dlaf",
default=False,
description="Enable DLA-Future eigensolver and Cholesky decomposition",
# TODO: Pin version when integrated in a release
when="@master build_system=cmake",
when="@2024.1: build_system=cmake",
)
variant(
"sirius",
@ -274,7 +274,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
depends_on("sirius@7.2", when="@8.3:8.9")
depends_on("sirius@7.3:", when="@9.1")
depends_on("sirius@7.4:7.5", when="@2023.2")
depends_on("sirius@7.5:", when="@master")
depends_on("sirius@7.5:", when="@2024.1:")
conflicts("~mpi", msg="SIRIUS requires MPI")
# sirius support was introduced in 7, but effectively usable starting from CP2K 9
conflicts("@:8")
@ -439,7 +439,7 @@ def edit(self, spec, prefix):
"aocc": ["-O2"],
}
dflags = ["-DNDEBUG"]
dflags = ["-DNDEBUG"] if spec.satisfies("@:2023.2") else []
cppflags = ["-D__FFTW3", "-I{0}".format(fftw_header_dir)]
# CP2K requires MPI 3 starting at version 2023.1