Bug 2311911

Summary: scipy throws flapack error
Product: [Fedora] Fedora Reporter: Susi Lehtola <susi.lehtola>
Component: scipyAssignee: Nikola Forró <nforro>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 40CC: cstratak, david08741, mmuzila, nforro, psimovec, python-packagers-sig, tomspur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: scipy-1.14.1-1.fc42 scipy-1.11.3-11.fc40 scipy-1.11.3-16.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-13 02:59:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2211813    
Bug Blocks:    

Description Susi Lehtola 2024-09-12 13:05:17 UTC
scipy appears to have some problem with lapack: the example code below fails to run.

Reproducible: Always

Steps to Reproduce:
import numpy
import scipy

s=numpy.asarray([[1.0]])
e, v = scipy.linalg.eigh(s)
print(e,v)
Actual Results:  
$ python3 test.py 
Traceback (most recent call last):
  File "/tmp/test.py", line 5, in <module>
    e, v = scipy.linalg.eigh(s)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/scipy/linalg/_decomp.py", line 560, in eigh
    w, v, *other_args, info = drv(a=a1, **drv_args, **lwork_args)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1


Expected Results:  
Code prints out eigenvalue [1] with eigenvector [[1]]

Comment 1 Susi Lehtola 2024-09-12 13:09:27 UTC
In addition to Fedora 40, it looks like the same problem also affects rawhide. Both on the x86_64 architecture.

Comment 2 Susi Lehtola 2024-09-12 13:14:46 UTC
It looks like this is an upstream compatibility issue with OpenBLAS 0.3.26 that has already been addressed

https://github.com/scipy/scipy/issues/19831
https://github.com/conda-forge/scipy-feedstock/pull/268

Comment 3 Nikola Forró 2024-09-13 08:29:25 UTC
Thanks for the report, I backported the upstream patch but then other issues popped up, so I think it makes more sense to focus on a rebase to the latest upstream version.

Comment 4 Fedora Update System 2024-11-04 19:45:02 UTC
FEDORA-2024-4f13d1f1ca (scipy-1.11.3-11.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-4f13d1f1ca

Comment 5 Fedora Update System 2024-11-04 19:45:03 UTC
FEDORA-2024-7b36e304ec (scipy-1.11.3-16.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-7b36e304ec

Comment 6 Fedora Update System 2024-11-05 04:12:20 UTC
FEDORA-2024-7b36e304ec has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-7b36e304ec`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-7b36e304ec

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2024-11-05 06:52:24 UTC
FEDORA-2024-4f13d1f1ca has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-4f13d1f1ca`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-4f13d1f1ca

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2024-11-13 02:59:12 UTC
FEDORA-2024-4f13d1f1ca (scipy-1.11.3-11.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2024-11-13 03:12:00 UTC
FEDORA-2024-7b36e304ec (scipy-1.11.3-16.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.