Skip to content

Commit

Permalink
Merge pull request #268 from h-vetinari/openblas
Browse files Browse the repository at this point in the history
backport patch for compatibility with OpenBLAS 0.3.26
  • Loading branch information
h-vetinari authored Jan 23, 2024
2 parents 4fde292 + ca1517d commit cc9da5f
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 8 deletions.
10 changes: 6 additions & 4 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ source:
- url: https://github.com/scipy/scipy/archive/refs/tags/v{{ version }}.tar.gz
sha256: 2ade75a1993b703a4cbe43b32f531feb291918cfd6d220778e107cb50b3e0266
patches:
# backport https://github.com/scipy/scipy/pull/19909
- patches/0001-MAINT-linalg-Adjust-lwork-liwork-changes-OpenBLAS-0..patch
# backport https://github.com/scipy/scipy/pull/19937
- patches/0001-TST-Add-RNG-seeds-for-TestInvgauss-and-TestLaplace-1.patch
- patches/0002-TST-Add-RNG-seeds-for-TestInvgauss-and-TestLaplace-1.patch
# backport https://github.com/scipy/scipy/pull/19945
- patches/0002-BLD-fix-issue-with-escape-sequences-in-__config__.py.patch
- patches/0003-BLD-fix-issue-with-escape-sequences-in-__config__.py.patch
# https://github.com/scipy/scipy/tree/v{{ version }}/scipy/_lib
- git_url: https://github.com/data-apis/array-api-compat.git
git_rev: affd3a56927d3d1c178023121f43c9fa624eced0
Expand Down Expand Up @@ -231,8 +233,8 @@ outputs:
- pooch
commands:
{% set tests_to_skip = "_not_a_real_test" %}
# skip a test that fails with MKL, scipy/scipy#15533
{% set tests_to_skip = tests_to_skip + " or test_x0_equals_Mb[nonsymposdef-bicgstab]" %} # [win]
# scipy/scipy#15533 - fails depending on BLAS/LAPACK implementation resp. CPU features
{% set tests_to_skip = tests_to_skip + " or test_x0_equals_Mb[nonsymposdef-bicgstab]" %} # [win or aarch64]
# scipy/scipy#19210 - 60 failing tests!
{% set tests_to_skip = tests_to_skip + " or (TestQR and (delete_f or insert_f or update_f))" %} # [aarch64]
{% set tests_to_skip = tests_to_skip + " or (TestLstsq and test_random_overdet)" %} # [aarch64]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 1ab518624be781c63093d70fceef864a9050a60e Mon Sep 17 00:00:00 2001
From: Ilhan Polat <ilhanpolat@gmail.com>
Date: Thu, 18 Jan 2024 14:47:42 +0100
Subject: [PATCH 1/3] MAINT:linalg:Adjust lwork/liwork changes OpenBLAS 0.3.26

See https://github.com/Reference-LAPACK/lapack/pull/942
---
scipy/linalg/flapack_sym_herm.pyf.src | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scipy/linalg/flapack_sym_herm.pyf.src b/scipy/linalg/flapack_sym_herm.pyf.src
index f07dbaecbc..af04e0d8d8 100644
--- a/scipy/linalg/flapack_sym_herm.pyf.src
+++ b/scipy/linalg/flapack_sym_herm.pyf.src
@@ -762,8 +762,8 @@ subroutine <prefix2>syevr(compute_v,range,lower,n,a,lda,vl,vu,il,iu,abstol,w,z,m
<ftype2> optional,intent(in) :: vl=0.0
<ftype2> optional,intent(in),check(vu>=vl),depend(vl) :: vu=1.0
<ftype2> intent(in) :: abstol=0.0
- integer optional,intent(in),depend(n),check(lwork>=max(1,26*n)||lwork==-1) :: lwork=max(26*n,1)
- integer optional,intent(in),depend(n),check(liwork>=max(1,10*n)||liwork==-1):: liwork= max(1,10*n)
+ integer optional,intent(in),depend(n),check(lwork>=(n <= 1 ? 1 : max(1,26*n))||lwork==-1) :: lwork=max(26*n,1)
+ integer optional,intent(in),depend(n),check(liwork>=(n <= 1 ? 1 : max(1,10*n))||liwork==-1):: liwork= max(1,10*n)

integer intent(hide),depend(a) :: n=shape(a,0)
integer intent(hide),depend(n) :: lda=max(1,n)
@@ -832,9 +832,9 @@ subroutine <prefix2c>heevr(compute_v,range,lower,n,a,lda,vl,vu,il,iu,abstol,w,z,
<ftype2> optional,intent(in) :: vl=0.0
<ftype2> optional,intent(in),check(vu>vl),depend(vl) :: vu=1.0
<ftype2> intent(in) :: abstol=0.0
- integer optional,intent(in),depend(n),check(lwork>=max(2*n,1)||lwork==-1) :: lwork=max(2*n,1)
- integer optional,intent(in),depend(n),check(lrwork>=max(24*n,1)||lrwork==-1) :: lrwork=max(24*n,1)
- integer optional,intent(in),depend(n),check(liwork>=max(1,10*n)||liwork==-1):: liwork= max(1,10*n)
+ integer optional,intent(in),depend(n),check(lwork>=(n <= 1 ? 1 : max(1,2*n))||lwork==-1) :: lwork=max(2*n,1)
+ integer optional,intent(in),depend(n),check(lrwork>=(n <= 1 ? 1 : max(1,24*n))||lrwork==-1) :: lrwork=max(24*n,1)
+ integer optional,intent(in),depend(n),check(liwork>=(n <= 1 ? 1 : max(1,10*n))||liwork==-1):: liwork= max(1,10*n)

integer intent(hide),depend(a) :: n=shape(a,0)
integer intent(hide),depend(n) :: lda=max(1,n)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From fb621226e50d29e38350ec9102b746b275a8f3f6 Mon Sep 17 00:00:00 2001
From 19ac8ce5e81b4ee41be881b8c13767d785451a29 Mon Sep 17 00:00:00 2001
From: Ben Mares <services-git-throwaway1@tensorial.com>
Date: Mon, 22 Jan 2024 00:03:12 +0100
Subject: [PATCH 1/2] TST: Add RNG seeds for TestInvgauss and TestLaplace
Subject: [PATCH 2/3] TST: Add RNG seeds for TestInvgauss and TestLaplace
(#19937)

---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 3b0f2f05ea3eda4e6c1fe9c368376a0b7eaece1d Mon Sep 17 00:00:00 2001
From 3ba05df1f6e2065feaf051b2b8ef55e25f70a0f9 Mon Sep 17 00:00:00 2001
From: Ralf Gommers <ralf.gommers@gmail.com>
Date: Mon, 22 Jan 2024 23:30:40 +0100
Subject: [PATCH 2/2] BLD: fix issue with escape sequences in `__config__.py`
Subject: [PATCH 3/3] BLD: fix issue with escape sequences in `__config__.py`

Reported in https://github.com/conda-forge/scipy-feedstock/issues/264:
linker args contained a `\s` on Windows as part of a path in a linker
Expand Down

0 comments on commit cc9da5f

Please sign in to comment.