From 88a608a26c4cce954528ebdb8941066ff7a04e86 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Wed, 23 Dec 2020 08:31:19 -0700 Subject: papi: patch fortran tests for Cray FTN compiler (#20339) Signed-off-by: Howard Pritchard --- .../builtin/packages/papi/crayftn-fixes.patch | 57 ++++++++++++++++++++++ var/spack/repos/builtin/packages/papi/package.py | 1 + 2 files changed, 58 insertions(+) create mode 100644 var/spack/repos/builtin/packages/papi/crayftn-fixes.patch diff --git a/var/spack/repos/builtin/packages/papi/crayftn-fixes.patch b/var/spack/repos/builtin/packages/papi/crayftn-fixes.patch new file mode 100644 index 0000000000..bd4aa652d5 --- /dev/null +++ b/var/spack/repos/builtin/packages/papi/crayftn-fixes.patch @@ -0,0 +1,57 @@ +From ddfa53f3e20218dceaed6e0bfbe307e531ae879f Mon Sep 17 00:00:00 2001 +From: Howard Pritchard +Date: Thu, 10 Dec 2020 15:05:33 -0700 +Subject: [PATCH] fix fixed form ftn argument for crayftn patch openmp.F + +Signed-off-by: Howard Pritchard + +diff --git a/src/ftests/Makefile b/src/ftests/Makefile +index 315e1e76..d45fbb6d 100644 +--- a/src/ftests/Makefile ++++ b/src/ftests/Makefile +@@ -3,7 +3,7 @@ + include Makefile.target + + INCLUDE = -I../testlib -I. -I.. +-FFLAGS = $(CFLAGS) -ffixed-line-length-132 ++FFLAGS = $(CFLAGS) -N132 + testlibdir=../testlib + TESTLIB= $(testlibdir)/libtestlib.a + DOLOOPS= $(testlibdir)/do_loops.o +diff --git a/src/ftests/openmp.F b/src/ftests/openmp.F +index 6cd5af23..ccf9030a 100644 +--- a/src/ftests/openmp.F ++++ b/src/ftests/openmp.F +@@ -18,7 +18,7 @@ + tests_quiet = get_quiet() + es = PAPI_NULL + +- call PAPIF_thread_init(omp_get_thread_num, retval) ++ call PAPIF_thread_init(my_thread_num, retval) + + + retval = PAPI_VER_CURRENT +@@ -64,7 +64,6 @@ + + !$OMP END PARALLEL + +- + call PAPIf_stop(es, values(1), retval) + if ( retval .NE. PAPI_OK ) then + call ftest_fail(__FILE__, __LINE__, +@@ -80,3 +79,12 @@ + call ftests_pass(__FILE__) + end + ++ function my_thread_num() ++ use omp_lib ++ integer::my_thread_num ++ ++ my_thread_num = omp_get_thread_num() ++ ++ end function my_thread_num ++ ++ +-- +2.26.2 + diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index 04a425b3ad..d3bf5cc786 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -62,6 +62,7 @@ class Papi(AutotoolsPackage): # Does not build with newer versions of gcc, see # https://bitbucket.org/icl/papi/issues/46/cannot-compile-on-arch-linux patch('https://bitbucket.org/icl/papi/commits/53de184a162b8a7edff48fed01a15980664e15b1/raw', sha256='64c57b3ad4026255238cc495df6abfacc41de391a0af497c27d0ac819444a1f8', when='@5.4.0:5.6.99%gcc@8:') + patch('crayftn-fixes.patch', when='@6.0.0:%cce@9:') configure_directory = 'src' -- cgit v1.2.3-60-g2f50