Skip to content

TST: linalg: race condition in BLAS ger* #23084

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

Merged
merged 9 commits into from
Jun 25, 2025
Merged

Conversation

crusaderky
Copy link
Contributor

@crusaderky crusaderky commented May 30, 2025

Tested many times on a 32-CPUs host with --parallel-threads=32.

@crusaderky crusaderky marked this pull request as draft May 30, 2025 12:12
@github-actions github-actions bot added scipy.linalg CI Items related to the CI tools such as CircleCI, GitHub Actions or Azure maintenance Items related to regular maintenance tasks labels May 30, 2025
@crusaderky crusaderky changed the title DNM TST: linalg: race condition in ger* DNM TST: linalg: race condition in BLAS ger* May 30, 2025
@rgommers rgommers added the free-threading Items related to supporting free-threaded (a.k.a. "no-GIL") builds of CPython label May 31, 2025
@rgommers
Copy link
Member

Thanks, glad to see that fixed now. We should only merge this after NumPy 2.3.0 is out with the fix.

@crusaderky crusaderky changed the title DNM TST: linalg: race condition in BLAS ger* TST: linalg: race condition in BLAS ger* Jun 8, 2025
@crusaderky
Copy link
Contributor Author

NumPy 2.3.0 final is out and this should be now mergeable (if CI agrees)

@crusaderky crusaderky marked this pull request as ready for review June 8, 2025 23:32
@rgommers rgommers changed the title TST: linalg: race condition in BLAS ger* TST: linalg: race condition in BLAS ger* Jun 9, 2025
@rgommers rgommers added this to the 1.17.0 milestone Jun 9, 2025
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is happy, but that's expected since parallel testing is currently disabled. Some local testing shows that there's still a problem, this crashes regularly:

pixi r test-nogil -t scipy.linalg.tests.test_blas -- --parallel-threads=5 -k test_ger

@crusaderky
Copy link
Contributor Author

CI is happy, but that's expected since parallel testing is currently disabled. Some local testing shows that there's still a problem, this crashes regularly:

pixi r test-nogil -t scipy.linalg.tests.test_blas -- --parallel-threads=5 -k test_ger

Can't reproduce on my box on 32 threads. Could you rm -rf build-nogil build-nogil-install ../.pixi/envs/free-threading and try again?

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can no longer reproduce the issue after thoroughly cleaning build env and caches - not sure what happened there. In it goes, thanks @crusaderky!

@rgommers rgommers merged commit fcf6811 into scipy:main Jun 25, 2025
38 of 39 checks passed
@crusaderky crusaderky deleted the linalg_forcomb branch June 25, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Items related to the CI tools such as CircleCI, GitHub Actions or Azure free-threading Items related to supporting free-threaded (a.k.a. "no-GIL") builds of CPython maintenance Items related to regular maintenance tasks scipy.linalg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: *ger* routines in linalg.blas are not thread-safe
2 participants