Skip to content

Conversation

rgommers
Copy link
Member

See commit messages for more details.

@rgommers
Copy link
Member Author

rgommers commented Oct 15, 2025

Hmm one failure, same as numpy/numpy#29391. The scipy-openblas bump to 0.3.30.2 isn't actually robust, so need to drop that change. I'll document that in the requirements file instead, otherwise we'll rediscover that again next time someone tries.

EDIT: or not, unclear if 0.3.30.1 has the same problem, since apparently it has existed for a while, so this may just be the cause of a flaky test. Failure in one of the Windows jobs:

EDIT 2: it's not even on this PR, it's on the cibuildwheel bump merge to main that was just merged. So really just a flaky test.

  ___________________ TestRegression.test_openblas_threading ____________________
  [gw3] win32 -- Python 3.13.8 C:\Users\runneradmin\AppData\Local\Temp\cibw-run-r0nwspyh\cp313-win_amd64\venv-test\Scripts\python.exe
  
  self = <numpy.linalg.tests.test_regression.TestRegression object at 0x00000189A476FAD0>
  
      def test_openblas_threading(self):
          # gh-27036
          # Test whether matrix multiplication involving a large matrix always
          # gives the same (correct) answer
          x = np.arange(500000, dtype=np.float64)
          src = np.vstack((x, -10 * x)).T
          matrix = np.array([[0, 1], [1, 0]])
          expected = np.vstack((-10 * x, x)).T  # src @ matrix
          for i in range(200):
              result = src @ matrix
              mismatches = (~np.isclose(result, expected)).sum()
              if mismatches != 0:
  >               assert False, ("unexpected result from matmul, "
                      "probably due to OpenBLAS threading issues")
  E               AssertionError: unexpected result from matmul, probably due to OpenBLAS threading issues
  E               assert False
  
  expected   = array([[-0.00000e+00,  0.00000e+00],
         [-1.00000e+01,  1.00000e+00],
         [-2.00000e+01,  2.00000e+00],
         ...99997e+06,  4.99997e+05],
         [-4.99998e+06,  4.99998e+05],
         [-4.99999e+06,  4.99999e+05]], shape=(500000, 2))
  i          = 0
  matrix     = array([[0, 1],
         [1, 0]])
  mismatches = np.int64(21849)
  result     = array([[ 0.00000e+00,  0.00000e+00],
         [-1.00000e+01,  1.00000e+00],
         [-2.00000e+01,  2.00000e+00],
         ...99997e+06,  4.99997e+05],
         [-4.99998e+06,  4.99998e+05],
         [-4.99999e+06,  4.99999e+05]], shape=(500000, 2))
  self       = <numpy.linalg.tests.test_regression.TestRegression object at 0x00000189A476FAD0>
  src        = array([[ 0.00000e+00, -0.00000e+00],
         [ 1.00000e+00, -1.00000e+01],
         [ 2.00000e+00, -2.00000e+01],
         ...99997e+05, -4.99997e+06],
         [ 4.99998e+05, -4.99998e+06],
         [ 4.99999e+05, -4.99999e+06]], shape=(500000, 2))
  x          = array([0.00000e+00, 1.00000e+00, 2.00000e+00, ..., 4.99997e+05,
         4.99998e+05, 4.99999e+05], shape=(500000,))

@charris
Copy link
Member

charris commented Oct 15, 2025

That error isn't unusual these days. Need to ping Apple again.

EDIT: It is common enough that we might want to ignore that failure in the test.

@charris charris merged commit e6d5e96 into numpy:main Oct 15, 2025
76 checks passed
@charris
Copy link
Member

charris commented Oct 15, 2025

Thanks Ralf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants