Skip to content

Commit cbaf538

Browse files
authored
Merge pull request #17713 from boegel/20230413183532_new_pr_SciPy-bundle202302
add patch for scipy 1.10.1 extension in SciPy-bundle 2023.02 to fix broken test
2 parents 7ca4834 + 0f05fca commit cbaf538

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

easybuild/easyconfigs/s/SciPy-bundle/SciPy-bundle-2023.02-gfbf-2022b.eb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ exts_list = [
5151
'patches': [
5252
'scipy-1.10.1_disable-tests.patch',
5353
'scipy-1.10.1_xfail-aarch64_test_maxiter_worsening.patch',
54+
'scipy-1.10.1_fix-lobpcg-test.patch',
5455
],
5556
'checksums': [
5657
{'scipy-1.10.1.tar.gz': '2cf9dfb80a7b4589ba4c40ce7588986d6d5cebc5457cad2c2880f6bc2d42f3a5'},
5758
{'scipy-1.10.1_disable-tests.patch': '5d36d416fb7ea9297514c3988d9f506793e39dc4c0daedccf6733c3dd7e3dcc0'},
5859
{'scipy-1.10.1_xfail-aarch64_test_maxiter_worsening.patch':
5960
'48177d6af51cf3e3d46aed8425807f0a65a498f7558f475032e0ad846559a23e'},
61+
{'scipy-1.10.1_fix-lobpcg-test.patch': 'eb4c576959108df0b1749705e64fe42e79edcf5aa8f6b4d7908f9b136d0d6648'},
6062
],
6163
'enable_slow_tests': True,
6264
'ignore_test_result': False,
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
change test for a warning to filterwarnings since the code may or not issue a warning depending on an arch
2+
see https://github.com/scipy/scipy/issues/17954 + https://github.com/scipy/scipy/pull/17975
3+
diff --git a/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py b/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
4+
index afd7a106ea0..87f3756c37d 100644
5+
--- a/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
6+
+++ b/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
7+
@@ -255,17 +255,18 @@
8+
_check_fiedler(12, 2)
9+
10+
11+
-@pytest.mark.skipif(platform.machine() == 'aarch64',
12+
- reason="issue #15935")
13+
+@pytest.mark.filterwarnings("ignore:Failed at iteration")
14+
+@pytest.mark.filterwarnings("ignore:Exited at iteration")
15+
+@pytest.mark.filterwarnings("ignore:Exited postprocessing")
16+
def test_failure_to_run_iterations():
17+
"""Check that the code exists gracefully without breaking. Issue #10974.
18+
+ The code may or not issue a warning, filtered out. Issue #15935, #17954.
19+
"""
20+
rnd = np.random.RandomState(0)
21+
X = rnd.standard_normal((100, 10))
22+
A = X @ X.T
23+
Q = rnd.standard_normal((X.shape[0], 4))
24+
- with pytest.warns(UserWarning, match="Failed at iteration"):
25+
- eigenvalues, _ = lobpcg(A, Q, maxiter=40, tol=1e-12)
26+
+ eigenvalues, _ = lobpcg(A, Q, maxiter=40, tol=1e-12)
27+
assert(np.max(eigenvalues) > 0)
28+
29+

0 commit comments

Comments
 (0)