Add gipaw when building quantum-espresso with cmake (#41142)

* gipaw.x installed by cmake if version >= 5c4a4ce.

gipaw.x will only be installed with cmake if the qe-gipaw version
is >= 5c4a4ce. Currently, QE source uses the older f5823521 one.
Here a patch to the submodule_commit_hash_records to use a newer
qe-gipaw version.
This commit is contained in:
Sergio Alexis Paz 2023-11-29 17:16:27 -03:00 committed by GitHub
parent b6f8cb821c
commit 3987604b89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 5 deletions

View file

@ -0,0 +1,8 @@
--- spack-src/external/submodule_commit_hash_records.org 2023-11-15 18:38:47.485317449 -0300
+++ spack-src/external/submodule_commit_hash_records 2023-11-15 18:39:02.661861757 -0300
@@ -5,4 +5,4 @@
82005cbb65bdf5d32ca021848eec8f19da956a77 mbd
f72ab25fa4ea755c1b4b230ae8074b47d5509c70 pw2qmcpack
1d6b187374a2d50b509e5e79e2cab01a79ff7ce1 wannier90
-f5823521ad8fdd8b8e9e29197eedb354f9b9146d qe-gipaw
+eccee44d3caf1c930fb72ad9c741fbb743eabf45 qe-gipaw

View file

@ -227,13 +227,8 @@ class QuantumEspresso(CMakePackage, Package):
variant(
"gipaw",
default=False,
when="build_system=generic",
description="Builds Gauge-Including Projector Augmented-Waves executable",
)
with when("+gipaw"):
conflicts(
"@:6.3", msg="gipaw standard support available for QE 6.3 or grater version only"
)
# Dependencies not affected by variants
depends_on("blas")
@ -260,6 +255,15 @@ class QuantumEspresso(CMakePackage, Package):
# NOTE: *SOME* third-party patches will require deactivation of
# upstream patches using `~patch` variant
# gipaw
conflicts(
"@:6.2",
when="+gipaw",
msg="gipaw standard support available for QE 6.3 or grater version only",
)
conflicts("+gipaw build_system=cmake", when="@:7.1")
# Only CMake will work for @6.8: %aocc
conflicts(
"build_system=generic", when="@6.8: %aocc", msg="Please use CMake to build with AOCC"
@ -400,6 +404,9 @@ class QuantumEspresso(CMakePackage, Package):
# extlibs_makefile updated to work with fujitsu compilers
patch("fj-fox.patch", when="+patch %fj")
# gipaw.x will only be installed with cmake if the qe-gipaw version is >= 5c4a4ce.
patch("gipaw-eccee44.patch", when="@7.2+gipaw build_system=cmake")
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
def cmake_args(self):
@ -416,6 +423,10 @@ def cmake_args(self):
self.define_from_variant("QE_ENABLE_MPI_GPU_AWARE", "mpigpu"),
]
if "+gipaw" in spec:
cmake_args.append(self.define("QE_ENABLE_PLUGINS", "gipaw"))
cmake_args.append(self.define("QE_ENABLE_FOX", True))
if "+cuda" in self.spec:
cmake_args.append(self.define("QE_ENABLE_OPENACC", True))