summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorHoward Pritchard <hppritcha@gmail.com>2020-12-23 08:31:19 -0700
committerGitHub <noreply@github.com>2020-12-23 09:31:19 -0600
commit88a608a26c4cce954528ebdb8941066ff7a04e86 (patch)
tree53ef3618b3bf02907353f64e1f1e409fe342c0e1 /var
parent857749a9ba3619f8190cc8b817d66125cf846c94 (diff)
downloadspack-88a608a26c4cce954528ebdb8941066ff7a04e86.tar.gz
spack-88a608a26c4cce954528ebdb8941066ff7a04e86.tar.bz2
spack-88a608a26c4cce954528ebdb8941066ff7a04e86.tar.xz
spack-88a608a26c4cce954528ebdb8941066ff7a04e86.zip
papi: patch fortran tests for Cray FTN compiler (#20339)
Signed-off-by: Howard Pritchard <hppritcha@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/papi/crayftn-fixes.patch57
-rw-r--r--var/spack/repos/builtin/packages/papi/package.py1
2 files changed, 58 insertions, 0 deletions
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 <hppritcha@gmail.com>
+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 <hppritcha@gmail.com>
+
+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'