Repository navigation
FIX OpenBLAS pthreads can only be controlled from one thread at a time #275
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
ogrisel
merged 20 commits into
joblib:master
from
itamarst:openblas-pthreads-one-thread-only
Oct 29, 2026
+304
−9
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
126b24f
Sketch of limiting OpenBLAS pthreads to being controlled from one thr…
itamarst 2d58a11
More useful semantics for joblib's expected interaction pattern
itamarst 3c155c2
Explanations
itamarst 5689e7e
Tests pass.
itamarst fb9494d
Update docs to document new required idiom
itamarst f2e8e6a
Reformat
itamarst efd104f
Unit tests
itamarst e3209a9
Changelog entry
itamarst 162de4d
Ruff lints
itamarst 73958f5
Merge remote-tracking branch 'upstream/master' into openblas-pthreads…
itamarst dc92665
Apply batched suggestions from code review
itamarst 59c101b
Improve docs
itamarst 9d0bfb4
Merge remote-tracking branch 'upstream/master' into openblas-pthreads…
itamarst 438fc6f
Automatically clear controlling thread in decorators and wrappers
itamarst 43ef17c
Skip if only OpenMP OpenBLAS is available
itamarst ba642b1
Make the controlling thread singleton public and test it directly.
itamarst df2382d
Mention other new bit
itamarst e9e0544
Don't leave limits at 1
itamarst ba64ace
Merge branch 'master' into openblas-pthreads-one-thread-only
ogrisel 8d2f669
Merge branch 'master' into openblas-pthreads-one-thread-only
ogrisel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,19 @@ | ||
| import pytest | ||
|
|
||
| collect_ignore = [ | ||
| "tests/empirical_scope_observation.py", | ||
| "tests/_openmp_test_helper.py", | ||
| "tests/_limit_blas.py", | ||
| "tests/_dl_iterate_phdr_deadlock.py", | ||
| "tests/_get_cached_controller.py", | ||
| ] | ||
|
|
||
|
|
||
| @pytest.fixture(autouse=True) | ||
| def reset_openblas_controlling_thread(): | ||
| from threadpoolctl import OpenBLASController | ||
|
|
||
| try: | ||
| yield | ||
| finally: | ||
| OpenBLASController.clear_controlling_thread(force=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.