summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort-karatsu <49965247+t-karatsu@users.noreply.github.com>2019-10-22 08:27:39 +0900
committerAdam J. Stewart <ajstewart426@gmail.com>2019-10-21 18:27:39 -0500
commit0e3e1836ff9f19664766299314f4afd1fbde08c0 (patch)
tree95070df2c4d4065cf1d8e21a32a5e299c5b684c9
parent26141ad489e4d6f4f67a2b638b6fd5b84a117fb1 (diff)
downloadspack-0e3e1836ff9f19664766299314f4afd1fbde08c0.tar.gz
spack-0e3e1836ff9f19664766299314f4afd1fbde08c0.tar.bz2
spack-0e3e1836ff9f19664766299314f4afd1fbde08c0.tar.xz
spack-0e3e1836ff9f19664766299314f4afd1fbde08c0.zip
arpack-ng: Fixed error that is not compatible with isnan. (#13246)
-rw-r--r--var/spack/repos/builtin/packages/arpack-ng/incompatible_isnan_fix.patch22
-rw-r--r--var/spack/repos/builtin/packages/arpack-ng/package.py4
2 files changed, 26 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/arpack-ng/incompatible_isnan_fix.patch b/var/spack/repos/builtin/packages/arpack-ng/incompatible_isnan_fix.patch
new file mode 100644
index 0000000000..a2290e4cc5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/arpack-ng/incompatible_isnan_fix.patch
@@ -0,0 +1,22 @@
+diff -ur arpack-ng-3.7.0_org/TESTS/bug_58_double.f arpack-ng-3.7.0/TESTS/bug_58_double.f
+--- arpack-ng-3.7.0_org/TESTS/bug_58_double.f 2019-10-17 12:17:22.496987817 +0900
++++ arpack-ng-3.7.0/TESTS/bug_58_double.f 2019-10-17 17:12:37.669353870 +0900
+@@ -69,7 +69,7 @@
+ & workev(3*maxncv),
+ & workl(3*maxncv*maxncv+6*maxncv),
+ & dd(maxn), dl(maxn), du(maxn),
+- & du2(maxn), a(maxn,maxn), c(maxn,maxn)
++ & du2(maxn), a(maxn,maxn), c(maxn,maxn), rslt
+ c
+ c %---------------%
+ c | Local Scalars |
+@@ -417,7 +417,8 @@
+ print *, ' '
+ c
+ end if
+- if (isnan(v(1,1))) then
++ rslt = v(1,1)
++ if (rslt .ne. rslt) then
+ stop 1
+ end if
+ c
diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py
index f7628cc5ae..d283403515 100644
--- a/var/spack/repos/builtin/packages/arpack-ng/package.py
+++ b/var/spack/repos/builtin/packages/arpack-ng/package.py
@@ -59,6 +59,10 @@ class ArpackNg(Package):
patch('make_install.patch', when='@3.4.0')
patch('parpack_cmake.patch', when='@3.4.0')
+ # Fujitsu compiler does not support 'isnan' function.
+ # isnan: function that determines whether it is NaN.
+ patch('incompatible_isnan_fix.patch', when='%fj')
+
depends_on('blas')
depends_on('lapack')
depends_on('automake', when='@3.3.0', type='build')