diff options
author | Glenn Johnson <glenn-johnson@uiowa.edu> | 2022-12-12 07:27:54 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-12 14:27:54 +0100 |
commit | 9fdb36585f083133232686015903c022ea653980 (patch) | |
tree | c4b3b3b1b7f65fc6fc93cd5f68471c23fbd5990f /var | |
parent | 1f0a9fdc1107b18bc36413bbc9d7f93e2ea0e0e3 (diff) | |
download | spack-9fdb36585f083133232686015903c022ea653980.tar.gz spack-9fdb36585f083133232686015903c022ea653980.tar.bz2 spack-9fdb36585f083133232686015903c022ea653980.tar.xz spack-9fdb36585f083133232686015903c022ea653980.zip |
Fix openblas build with intel compiler (#34432)
This PR patches the f_check script to detect the ifort compiler and
ensure that F_COMPILER is iset to INTEL. This problem was introduced with
openblas-0.3.21. Without this patch, the value of F_COMPILER falls back
to G77 and icc rather than ifort is used for the linking stage. That
results in the openblas library missing libifcore, which in turn means
many Fotran programs can not be compiled with ifort.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/openblas/f_check-intel.patch | 24 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/openblas/package.py | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/f_check-intel.patch b/var/spack/repos/builtin/packages/openblas/f_check-intel.patch new file mode 100644 index 0000000000..d395e7c80f --- /dev/null +++ b/var/spack/repos/builtin/packages/openblas/f_check-intel.patch @@ -0,0 +1,24 @@ +diff -ur a/f_check b/f_check +--- a/f_check 2022-08-07 15:36:26.000000000 -0500 ++++ b/f_check 2022-12-09 16:17:43.475278869 -0600 +@@ -102,7 +102,7 @@ + vendor=FLANG + openmp='-fopenmp' + ;; +- *ifx*) ++ *ifort*|*ifx*) + vendor=INTEL + openmp='-fopenmp' + ;; +diff -ur a/f_check.pl b/f_check.pl +--- a/f_check.pl 2022-08-07 15:36:26.000000000 -0500 ++++ b/f_check.pl 2022-12-09 16:18:59.982923288 -0600 +@@ -95,7 +95,7 @@ + if ($compiler =~ /flang/) { + $vendor = FLANG; + $openmp = "-fopenmp"; +- } elsif ($compiler =~ /ifx/) { ++ } elsif ($compiler =~ /ifort/ || $compiler =~ /ifx/) { + $vendor = INTEL; + $openmp = "-fopenmp"; + } elsif ($compiler =~ /pgf/ || $compiler =~ /nvf/) { diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index f403e1ef60..f909b9111c 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -94,6 +94,7 @@ class Openblas(MakefilePackage): # https://github.com/spack/spack/issues/31732 patch("f_check-oneapi.patch", when="@0.3.20 %oneapi") + patch("f_check-intel.patch", when="@0.3.21 %intel") # OpenBLAS >=3.0 has an official way to disable internal parallel builds patch("make.patch", when="@0.2.16:0.2.20") |