Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix or avoid various test failures that are showing up in CI #17057

Merged
merged 5 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linux_meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
popd

- name: Mypy
if: matrix.python-version == '3.11-dev'
if: matrix.python-version == '3.9'
run: |
# Packages that are only needed for their annotations
python -m pip install -r mypy_requirements.txt
Expand Down
11 changes: 6 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ stages:
test_mode: fast
numpy_spec: "numpy==1.19.5"
use_sdist: true
- job: wheel_optimized_gcc6
- job: wheel_optimized_gcc8
timeoutInMinutes: 90
pool:
vmImage: 'ubuntu-18.04'
Expand All @@ -114,14 +114,15 @@ stages:
# flag. This environment variable starts all Py instances in -OO mode.
PYTHONOPTIMIZE: 2
# Use gcc version 6
CC: gcc-6
CXX: g++-6
CC: gcc-8
CXX: g++-8
FC: gfortran-8
steps:
- script: |
set -euo pipefail
sudo apt update -y
sudo apt install -y g++-6 gcc-6
displayName: 'Install GCC 6'
sudo apt install -y g++-8 gcc-8 gfortran-8
displayName: 'Install GCC 8'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
Expand Down
4 changes: 4 additions & 0 deletions scipy/linalg/tests/test_decomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import itertools
import platform
import sys

import numpy as np
from numpy.testing import (assert_equal, assert_almost_equal,
assert_array_almost_equal, assert_array_equal,
Expand Down Expand Up @@ -2031,6 +2033,8 @@ class TestQZ:
def setup_method(self):
seed(12345)

@pytest.mark.xfail(sys.platform == 'darwin',
reason="gges[float32] broken for OpenBLAS on macOS, see gh-16949")
def test_qz_single(self):
n = 5
A = random([n, n]).astype(float32)
Expand Down
7 changes: 7 additions & 0 deletions scipy/linalg/tests/test_lapack.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Created by: Pearu Peterson, September 2002
#

import sys
from functools import reduce

from numpy.testing import (assert_equal, assert_array_almost_equal, assert_,
Expand Down Expand Up @@ -3051,6 +3052,9 @@ def test_trexc_NAG(t, ifst, ilst, expect):

@pytest.mark.parametrize('dtype', DTYPES)
def test_gges_tgexc(dtype):
if dtype == np.float32 and sys.platform == 'darwin':
pytest.xfail("gges[float32] broken for OpenBLAS on macOS, see gh-16949")

seed(1234)
atol = np.finfo(dtype).eps*100

Expand Down Expand Up @@ -3220,6 +3224,9 @@ def test_trsen_NAG(t, q, select, expect, expect_s, expect_sep):

@pytest.mark.parametrize('dtype', DTYPES)
def test_gges_tgsen(dtype):
if dtype == np.float32 and sys.platform == 'darwin':
pytest.xfail("gges[float32] broken for OpenBLAS on macOS, see gh-16949")

seed(1234)
atol = np.finfo(dtype).eps*100

Expand Down
2 changes: 1 addition & 1 deletion scipy/linalg/tests/test_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def test_solve_discrete_are():
np.eye(3),
1e6 * np.eye(3),
1e6 * np.eye(3),
None),
"Issue with OpenBLAS, see gh-16926"),
# TEST CASE 17 : darex #14
(np.array([[1 - 1/1e8, 0, 0, 0],
[1, 0, 0, 0],
Expand Down
14 changes: 9 additions & 5 deletions scipy/sparse/linalg/_eigen/tests/test_svds.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,11 +790,15 @@ def test_small_sigma(self, shape, dtype):
@pytest.mark.filterwarnings("ignore:The problem size")
@pytest.mark.parametrize("dtype", (float, complex, np.float32))
def test_small_sigma2(self, dtype):
if not has_propack:
pytest.skip("PROPACK not enabled")
# https://github.com/scipy/scipy/issues/11406
if dtype == complex and self.solver == 'propack':
pytest.skip("PROPACK unsupported for complex dtype")
if self.solver == 'propack':
if not has_propack:
pytest.skip("PROPACK not enabled")
elif dtype == np.float32:
pytest.skip("Test failures in CI, see gh-17004")
elif dtype == complex:
# https://github.com/scipy/scipy/issues/11406
pytest.skip("PROPACK unsupported for complex dtype")

rng = np.random.default_rng(179847540)
# create a 10x10 singular matrix with a 4-dim null space
dim = 4
Expand Down