quantum-espresso: fix building with aocc (#35612)

Co-authored-by: Tooley, Phil <phil.tooley@amd.com>
This commit is contained in:
AMD Toolchain Support 2023-03-01 15:17:42 +05:30 committed by GitHub
parent a1a54fa8b7
commit bedcc5449a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View File

@ -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=""

View File

@ -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")