summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2022-07-25 15:38:11 -0700
committerGitHub <noreply@github.com>2022-07-25 15:38:11 -0700
commit0662bbdc4342031250e464b844f98ee7313d42ca (patch)
treebf71801c42a37fb952626804f50db7d0ea538e53
parent7be0dac36b13b7399061b97ca43274feeff761c6 (diff)
downloadspack-0662bbdc4342031250e464b844f98ee7313d42ca.tar.gz
spack-0662bbdc4342031250e464b844f98ee7313d42ca.tar.bz2
spack-0662bbdc4342031250e464b844f98ee7313d42ca.tar.xz
spack-0662bbdc4342031250e464b844f98ee7313d42ca.zip
openblas %oneapi: patch f_check for proper linkage (#31737)
-rw-r--r--var/spack/repos/builtin/packages/openblas/f_check-oneapi.patch31
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py3
2 files changed, 34 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/f_check-oneapi.patch b/var/spack/repos/builtin/packages/openblas/f_check-oneapi.patch
new file mode 100644
index 0000000000..61d76867c9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openblas/f_check-oneapi.patch
@@ -0,0 +1,31 @@
+diff -ruN spack-src/f_check spack-src-new/f_check
+--- spack-src/f_check 2022-02-20 13:35:05.000000000 -0800
++++ spack-src-new/f_check 2022-07-25 14:41:31.877584474 -0700
+@@ -34,7 +34,7 @@
+ "pathf90", "pathf95",
+ "pgf95", "pgf90", "pgf77", "pgfortran", "nvfortran",
+ "flang", "egfortran",
+- "ifort", "nagfor");
++ "ifort", "nagfor", "ifx");
+
+ OUTER:
+ foreach $lists (@lists) {
+@@ -90,6 +90,9 @@
+ if ($compiler =~ /flang/) {
+ $vendor = FLANG;
+ $openmp = "-fopenmp";
++ } elsif ($compiler =~ /ifx/) {
++ $vendor = INTEL;
++ $openmp = "-fopenmp";
+ } elsif ($compiler =~ /pgf/ || $compiler =~ /nvf/) {
+ $vendor = PGI;
+ $openmp = "-mp";
+@@ -176,7 +179,7 @@
+ $openmp = "-fopenmp";
+ }
+
+- if ($compiler =~ /ifort/) {
++ if ($compiler =~ /ifort/ || $compiler =~ /ifx/) {
+ $vendor = INTEL;
+ $bu = "_";
+ $openmp = "-fopenmp";
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index ed18deae04..5d118b84f7 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -69,6 +69,9 @@ class Openblas(MakefilePackage):
provides('lapack@3.9.1:', when='@0.3.15:')
provides('lapack@3.7.0', when='@0.2.20')
+ # https://github.com/spack/spack/issues/31732
+ patch('f_check-oneapi.patch', when='@0.3.20 %oneapi')
+
# OpenBLAS >=3.0 has an official way to disable internal parallel builds
patch('make.patch', when='@0.2.16:0.2.20')
# This patch is in a pull request to OpenBLAS that has not been handled