diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2023-12-27 14:03:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-27 14:03:24 -0800 |
commit | f721d4c6256c05e40e5b71d8ae570e55ec3d9825 (patch) | |
tree | f191b0f1ae7c688329a2f981362112d16f7e2a44 /var | |
parent | b5668bac53f1b24459c9f3f2f9de0f0b6d33c9ad (diff) | |
download | spack-f721d4c6256c05e40e5b71d8ae570e55ec3d9825.tar.gz spack-f721d4c6256c05e40e5b71d8ae570e55ec3d9825.tar.bz2 spack-f721d4c6256c05e40e5b71d8ae570e55ec3d9825.tar.xz spack-f721d4c6256c05e40e5b71d8ae570e55ec3d9825.zip |
papi: patch for cray fortran bug with `-ffree-form` (#41886)
PAPI 7.1.0 unconditionally adds `FFLAGS = -ffree-form` in the sysdetect tests,
regardless of the compiler.
This was added in https://github.com/icl-utk-edu/papi/pull/108 to make a build with
`armflang` work, but it breaks CCE (and our `develop` pipeline).
- [x] Add a patch that fixes both problems
- [x] Patch PAPI when at 7.1.0 or higher
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/papi/package.py | 2 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/papi/sysdetect-free-form-fix.patch | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index dd9020a587..cfe6c5d7d1 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -84,6 +84,8 @@ class Papi(AutotoolsPackage, ROCmPackage): sha256="64c57b3ad4026255238cc495df6abfacc41de391a0af497c27d0ac819444a1f8", when="@5.4.0:5.6%gcc@8:", ) + # 7.1.0 erroneously adds -ffree-form for all fortran compilers + patch("sysdetect-free-form-fix.patch", when="@7.1.0:") patch("crayftn-fixes.patch", when="@6.0.0:%cce@9:") patch("intel-oneapi-compiler-fixes.patch", when="@6.0.0:%oneapi") patch("intel-cray-freeform.patch", when="@7.0.1") diff --git a/var/spack/repos/builtin/packages/papi/sysdetect-free-form-fix.patch b/var/spack/repos/builtin/packages/papi/sysdetect-free-form-fix.patch new file mode 100644 index 0000000000..d38cf1c3c3 --- /dev/null +++ b/var/spack/repos/builtin/packages/papi/sysdetect-free-form-fix.patch @@ -0,0 +1,17 @@ +diff --git a/src/components/sysdetect/tests/Makefile b/src/components/sysdetect/tests/Makefile +index 63ac01358..79ce57e4b 100644 +--- a/src/components/sysdetect/tests/Makefile ++++ b/src/components/sysdetect/tests/Makefile +@@ -21,11 +21,9 @@ endif + intel_compilers := ifort ifx + cray_compilers := ftn crayftn + +-FFLAGS += -ffree-form +- + ifeq ($(notdir $(F77)),gfortran) + FFLAGS +=-ffree-form -ffree-line-length-none +-else ifeq ($(notdir $(F77)),flang) ++else ifeq ($(patsubst %flang,,$(notdir $(F77))),) # compiler name ends with flang + FFLAGS +=-ffree-form + else ifneq ($(findstring $(notdir $(F77)), $(intel_compilers)),) + FFLAGS +=-free |