Skip to content

Conversation

@steppi
Copy link
Contributor

@steppi steppi commented Aug 29, 2023

Closes #24512, where linalg.eigvalsh was observed to be non-thread safe. I determined that the issue was due to the non-thread safe lapack_lite being called instead of the installed BLAS/LAPACK that appears in np.__show__.config(). @rgommers found that the issue is due to blas and lapack being missing from the _umath_linalg extension's sources. He proposed the following fix and I've confirmed that it works locally.

@github-actions github-actions bot added the 36 - Build Build related PR label Aug 29, 2023
@steppi
Copy link
Contributor Author

steppi commented Aug 29, 2023

I've made a sub-PR, rgommers#58, that I think should resolve the test failures.

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Aug 29, 2023
Closes numpygh-24512, where `linalg.eigvalsh` was observed to be non-thread
safe. This was due to the non-thread safe `lapack_lite` being called
instead of the installed BLAS/LAPACK.

Co-authored-by: Albert Steppi <[email protected]>
@rgommers rgommers marked this pull request as draft August 30, 2023 10:17
@rgommers rgommers marked this pull request as ready for review August 30, 2023 11:25
@rgommers rgommers changed the title BLD: fix _umath_linalg dependencies, remove linalg.lapack_lite BLD: fix _umath_linalg dependencies Aug 30, 2023
@rgommers rgommers added this to the 2.0.0 release milestone Aug 30, 2023
@rgommers
Copy link
Member

Thanks @steppi I incorporated your fix with a tweak. Reverting the removal of lapack_lite here was the right call I think - I'll leave that to a separate PR later, that makes this one easier to backport to 1.26.x.

@rgommers
Copy link
Member

Can you verify that this is still a complete fix?

@steppi
Copy link
Contributor Author

steppi commented Aug 30, 2023

Can you verify that this is still a complete fix?

Looks good and works locally. Thanks @rgommers.

@rgommers
Copy link
Member

Thanks! Let's go with this then. Marked for backport, so it should be present in 1.26.0rc1.

@rgommers rgommers merged commit a115ed3 into numpy:main Aug 30, 2023
@rgommers rgommers deleted the fix-umath-linalg branch August 30, 2023 12:20
charris pushed a commit to charris/numpy that referenced this pull request Aug 30, 2023
Closes numpygh-24512, where `linalg.eigvalsh` was observed to be non-thread
safe. This was due to the non-thread safe `lapack_lite` being called
instead of the installed BLAS/LAPACK.

Co-authored-by: Ralf Gommers <[email protected]>
@charris charris changed the title BLD: fix _umath_linalg dependencies BLD: fix _umath_linalg dependencies Aug 30, 2023
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Aug 30, 2023
@charris charris removed this from the 2.0.0 release milestone Aug 30, 2023
charris pushed a commit to charris/numpy that referenced this pull request Nov 11, 2023
Closes numpygh-24512, where `linalg.eigvalsh` was observed to be non-thread
safe. This was due to the non-thread safe `lapack_lite` being called
instead of the installed BLAS/LAPACK.

Co-authored-by: Ralf Gommers <[email protected]>
@TimotheusBachinger TimotheusBachinger mentioned this pull request Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

36 - Build Build related PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: SIGABRT on using ThreadPoolExecutor with linalg.eigvalsh in v1.26.0b1

3 participants