OpenBLAS: 0.3.22 breaks functions downstream in GNU Octave

OpenBLAS 0.3.21 works perfectly with GNU Octave, but 0.3.22 causes several test failures in matrix inverses, eigenvector calculations, and sparse matrix operations. These include returning Inf instead of NaN and giving an answer that is wrong by several orders of magnitude. Affected Octave functions include inv(), eigs(), residue(), and det(), and any user code using those functions.

Thread: https://octave.discourse.group/t/make-check-fails-with-openblas-0-3-22/4289

How to reproduce:

  1. Download & build a current version of GNU Octave from source: https://octave.org/download.
  2. Run make check.
  3. Observation: OpenBLAS 0.3.22 will give 10 test failures in the above functions. 0.3.21 will give zero test failures.

Workaround: I have reverted my system OpenBLAS to 0.3.21 for now, and Octave works properly again.

EDIT: Build settings for OpenBLAS, both versions:

FC=gfortran USE_OPENMP=1 USE_THREAD=1 USE_TLS=0 NO_STATIC=1 CPP_THREAD_SAFETY_TEST=1

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 29 (5 by maintainers)

Commits related to this issue

Most upvoted comments

0.3.23 released now, Windows binaries may have to wait until Monday noon (CET) unless I convince myself that the MXE (mingw) dlltool is fully equivalent to a native lib.exe (for creating the export file and import library from the generated .def)

Release preparations already in progress, only interrupted by dinner due to domestic misunderstanding…

closing as fixed by #3980 and #3984 - also received confirmation that the sagemath testsuite passes again with these (as do both numpy and scipy testsuites)

With the latest patch, using d70895137589b61b6d892a74b3c793735bf58b31, it works again in Octave:

$ LD_PRELOAD=./libopenblas_zenp-r0.3.22.dev.so octave -q

octave:1> version -blas
ans = OpenBLAS (config: OpenBLAS 0.3.22.dev NO_AFFINITY USE_OPENMP ZEN MAX_THREADS=32)

octave:2> C = [1, 0, 1, 0;  i, 1/3, -i, 1/3; 1, 2*i/3, 1, -2*i/3; i, -1/3, -i, -1/3]
C =
   1.0000 +      0i        0 +      0i   1.0000 +      0i        0 +      0i
        0 + 1.0000i   0.3333 +      0i        0 - 1.0000i   0.3333 +      0i
   1.0000 +      0i        0 + 0.6667i   1.0000 +      0i        0 - 0.6667i
        0 + 1.0000i  -0.3333 +      0i        0 - 1.0000i  -0.3333 +      0i

octave:3> [L, U, P] = lu(C), residual = P'*L*U - C
L =
   1.0000 +      0i        0 +      0i        0 +      0i        0 +      0i
   1.0000 +      0i   1.0000 +      0i        0 +      0i        0 +      0i
        0 + 1.0000i        0 - 0.5000i   1.0000 +      0i        0 +      0i
        0 + 1.0000i        0 + 0.5000i   1.0000 -      0i   1.0000 +      0i

U =
   1.0000 +      0i        0 +      0i   1.0000 +      0i        0 +      0i
        0 +      0i        0 + 0.6667i        0 +      0i        0 - 0.6667i
        0 +      0i        0 +      0i        0 - 2.0000i   0.6667 +      0i
        0 +      0i        0 +      0i        0 +      0i  -1.3333 +      0i

P =
Permutation Matrix
   1   0   0   0
   0   0   1   0
   0   1   0   0
   0   0   0   1

residual =
   0   0   0   0
   0   0   0   0
   0   0   0   0
   0   0   0   0

#3980 fixes the scipy error and also the rcond , lu und spurious residue errors from octave - I still see one scipy testsuite error: TestFBLAS2Simple::test_spr_hpr AssertionError: Arrays are not almost equal to 6 decimals. Mismatched elements 9/9 but have not checked if it is/was already present with 0.3.21