From a00b92a69f49006ad8024654650627f215a447a5 Mon Sep 17 00:00:00 2001 From: RĂ©mi Lacroix Date: Thu, 16 Feb 2023 10:33:48 +0100 Subject: cp2k: add v2023.1 (#35346) --- var/spack/repos/builtin/packages/cp2k/package.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 21a03642db..3daff41e5f 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -23,6 +23,7 @@ class Cp2k(MakefilePackage, CudaPackage): maintainers("dev-zero") + version("2023.1", sha256="dff343b4a80c3a79363b805429bdb3320d3e1db48e0ff7d20a3dfd1c946a51ce") version("2022.2", sha256="1a473dea512fe264bb45419f83de432d441f90404f829d89cbc3a03f723b8354") version("2022.1", sha256="2c34f1a7972973c62d471cd35856f444f11ab22f2ff930f6ead20f3454fd228b") version("9.1", sha256="fedb4c684a98ad857cd49b69a3ae51a73f85a9c36e9cb63e3b02320c74454ce6") @@ -151,10 +152,12 @@ class Cp2k(MakefilePackage, CudaPackage): depends_on("libxc@4.0.3:4", when="@6.0:6.9", type="build") depends_on("libxc@4.0.3:4", when="@7.0:8.1") depends_on("libxc@5.1.3:5.1", when="@8.2:8") - depends_on("libxc@5.1.7:5.1", when="@9:") + depends_on("libxc@5.1.7:5.1", when="@9:2022") + depends_on("libxc@6:6.1", when="@2023:") with when("+mpi"): depends_on("mpi@2:") + depends_on("mpi@3:", when="@2023.1:") depends_on("scalapack") with when("+cosma"): @@ -321,10 +324,13 @@ class Cp2k(MakefilePackage, CudaPackage): "-I{0}".format(fftw_header_dir), ] - if "^mpi@3:" in spec: - cppflags.append("-D__MPI_VERSION=3") - elif "^mpi@2:" in spec: - cppflags.append("-D__MPI_VERSION=2") + # CP2K requires MPI 3 starting at version 2023.1 + # and __MPI_VERSION is not supported anymore. + if "@:2022.2" in spec: + if "^mpi@3:" in spec: + cppflags.append("-D__MPI_VERSION=3") + elif "^mpi@2:" in spec: + cppflags.append("-D__MPI_VERSION=2") cflags = optimization_flags[self.spec.compiler.name][:] cxxflags = optimization_flags[self.spec.compiler.name][:] -- cgit v1.2.3-70-g09d2