Add mpi_f08 variant to CP2K (#40574)
* add mpi_f08 variant * add conflict * add conflict with released versions of cp2k and +mpi_f08
This commit is contained in:
parent
d317ddfebe
commit
49ea0a8e2e
@ -103,6 +103,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
|
||||
)
|
||||
variant("pytorch", default=False, description="Enable libtorch support")
|
||||
variant("quip", default=False, description="Enable quip support")
|
||||
variant("mpi_f08", default=False, description="Use MPI F08 module")
|
||||
|
||||
variant(
|
||||
"enable_regtests",
|
||||
@ -203,6 +204,9 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
|
||||
depends_on("mpi@2:")
|
||||
depends_on("mpi@3:", when="@2023.1:")
|
||||
depends_on("scalapack")
|
||||
depends_on("mpich+fortran", when="^mpich")
|
||||
|
||||
conflicts("~mpi_f08", when="^mpich@4.1:")
|
||||
|
||||
with when("+cosma"):
|
||||
depends_on("cosma+scalapack")
|
||||
@ -277,6 +281,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
|
||||
depends_on("dbcsr+openmp", when="+openmp")
|
||||
depends_on("dbcsr+cuda", when="+cuda")
|
||||
depends_on("dbcsr+rocm", when="+rocm")
|
||||
conflicts("+mpi_f08", when="@:2023.2")
|
||||
|
||||
# CP2K needs compiler specific compilation flags, e.g. optflags
|
||||
conflicts("%apple-clang")
|
||||
@ -540,6 +545,9 @@ def edit(self, spec, prefix):
|
||||
libs.extend(mpi)
|
||||
libs.extend(self.compiler.stdcxx_libs)
|
||||
|
||||
if "+mpi_f08" in spec:
|
||||
cppflags.append("-D__MPI_F08")
|
||||
|
||||
if "wannier90" in spec:
|
||||
cppflags.append("-D__WANNIER90")
|
||||
wannier = join_path(spec["wannier90"].libs.directories[0], "libwannier.a")
|
||||
@ -947,6 +955,7 @@ def cmake_args(self):
|
||||
self.define_from_variant("CP2K_USE_VORI", "libvori"),
|
||||
self.define_from_variant("CP2K_USE_SPLA", "spla"),
|
||||
self.define_from_variant("CP2K_USE_QUIP", "quip"),
|
||||
self.define_from_variant("CP2K_USE_MPI_F08", "mpi_f08"),
|
||||
]
|
||||
|
||||
# we force the use elpa openmp threading support. might need to be revisited though
|
||||
|
Loading…
Reference in New Issue
Block a user