summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAMD Toolchain Support <73240730+amd-toolchain-support@users.noreply.github.com>2023-03-01 15:17:42 +0530
committerGitHub <noreply@github.com>2023-03-01 10:47:42 +0100
commitbedcc5449adb88f208219b9bb99660ac7a485f2c (patch)
treee01cd5a9a64e00e85df51adfc3179502cbc54cd7 /var
parenta1a54fa8b7a14ab4cd5a0fe7a642860ef5e5075e (diff)
downloadspack-bedcc5449adb88f208219b9bb99660ac7a485f2c.tar.gz
spack-bedcc5449adb88f208219b9bb99660ac7a485f2c.tar.bz2
spack-bedcc5449adb88f208219b9bb99660ac7a485f2c.tar.xz
spack-bedcc5449adb88f208219b9bb99660ac7a485f2c.zip
quantum-espresso: fix building with aocc (#35612)
Co-authored-by: Tooley, Phil <phil.tooley@amd.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/quantum-espresso/configure_aocc.patch6
-rw-r--r--var/spack/repos/builtin/packages/quantum-espresso/package.py11
2 files changed, 12 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/quantum-espresso/configure_aocc.patch b/var/spack/repos/builtin/packages/quantum-espresso/configure_aocc.patch
index c6bea9a18b..c7ef8c6312 100644
--- a/var/spack/repos/builtin/packages/quantum-espresso/configure_aocc.patch
+++ b/var/spack/repos/builtin/packages/quantum-espresso/configure_aocc.patch
@@ -38,7 +38,7 @@ index 66337d1..d2c04af 100755
try_cflags="-O3"
;;
+x86_64:* )
-+ try_cflags="-Ofast -Mstack_arrays"
++ try_cflags=" -Mstack_arrays"
+ try_dflags="-D__OPENMP"
+ ;;
ppc64-bg:* )
@@ -49,9 +49,9 @@ index 66337d1..d2c04af 100755
have_cpp=0
;;
+*:*mpif90 )
-+ try_fflags="-Ofast -Mstack_arrays"
++ try_fflags="-Mstack_arrays"
+ try_fflags_openmp="-fopenmp"
-+ try_f90flags=" \$(FFLAGS) -cpp -Ofast -Mpreprocess -Mstack_arrays"
++ try_f90flags=" \$(FFLAGS) -cpp -Mpreprocess -Mstack_arrays"
+ try_foxflags="-D__PGI"
+ try_fflags_noopt="-O0"
+ try_ldflags=""
diff --git a/var/spack/repos/builtin/packages/quantum-espresso/package.py b/var/spack/repos/builtin/packages/quantum-espresso/package.py
index 374d4ec3e2..fe53254cf8 100644
--- a/var/spack/repos/builtin/packages/quantum-espresso/package.py
+++ b/var/spack/repos/builtin/packages/quantum-espresso/package.py
@@ -254,6 +254,13 @@ class QuantumEspresso(CMakePackage, Package):
# NOTE: *SOME* third-party patches will require deactivation of
# upstream patches using `~patch` variant
+ # Only CMake will work for @6.8: %aocc
+ conflicts(
+ "build_system=generic", when="@6.8: %aocc", msg="Please use CMake to build with AOCC"
+ )
+
+ conflicts("~openmp", when="^amdlibflame", msg="amdlibflame requires OpenMP")
+
# QMCPACK converter patches for QE 6.8, 6.7, 6.4.1, 6.4, and 6.3
conflicts(
"@:6.2,6.5:6.6",
@@ -362,8 +369,8 @@ class QuantumEspresso(CMakePackage, Package):
when="+patch@6.4.1:6.5.0",
)
- # Configure updated to work with AOCC compilers
- patch("configure_aocc.patch", when="@6.7:6.8 %aocc")
+ # Patch automake configure for AOCC compilers
+ patch("configure_aocc.patch", when="@6.7 %aocc")
# Configure updated to work with NVIDIA compilers
patch("nvhpc.patch", when="@6.5 %nvhpc")