Skip to content

docs: Correct README claim that OpenMP thread limits are process-wide#210

Closed
mvanhorn wants to merge 1 commit into
joblib:masterfrom
mvanhorn:fix/207-fix-openmp-thread-scope-doc
Closed

docs: Correct README claim that OpenMP thread limits are process-wide#210
mvanhorn wants to merge 1 commit into
joblib:masterfrom
mvanhorn:fix/207-fix-openmp-thread-scope-doc

Conversation

@mvanhorn

Copy link
Copy Markdown

Summary

The README's 'Limitations' section states that setting the maximum number of threads for OpenMP and BLAS libraries 'has a global effect and impacts the whole Python process' and that 'there is no thread level isolation as these libraries do not offer thread-local APIs.' Issue author itamarst demonstrated with reproducible programs (libgomp on Ubuntu, libomp via Conda-Forge) that OpenMP limits are in fact thread-specific: a limit set on the main thread does not affect a newly spawned thread's OpenMP thread count, while BLAS/OpenBLAS pthreads limits do remain process-wide. Maintainer ogrisel confirmed on 2026-06-17 that 'the documentation is wrong' and explicitly invited a PR for the fix.

Fixes #207

@tomMoral

Copy link
Copy Markdown
Contributor

This is already handled by the OP in #209
Closing this one.

@tomMoral tomMoral closed this Jun 17, 2026
@itamarst

itamarst commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Also mine has the benefit of not being written by an LLM sniping issues, as this appears to be. So I at least tried to make the PR accurate instead of outputting probabilistic (and in this case somewhat misleading) word salad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation incorrectly states that OpenMP limits are process-wide, when they are actually thread-specific

3 participants