Skip to content
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

Improve documentation for JULIA_NUM_THREADS=auto #42501

Merged
merged 3 commits into from
Oct 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/src/base/multi-threading.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Base.Threads.threadid
Base.Threads.nthreads
```

See also [Multi-Threading](@ref man-multithreading).
## Synchronization

```@docs
Expand Down
6 changes: 6 additions & 0 deletions doc/src/manual/multi-threading.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@ The number of execution threads is controlled either by using the
[`JULIA_NUM_THREADS`](@ref JULIA_NUM_THREADS) environment variable. When both are
specified, then `-t`/`--threads` takes precedence.

The number of threads can either be specified as an integer (`--threads=4`) or as `auto`
(`--threads=auto`), where `auto` sets the number of threads to the number of local CPU
threads.

!!! compat "Julia 1.5"
The `-t`/`--threads` command line argument requires at least Julia 1.5.
In older versions you must use the environment variable instead.

fredrikekre marked this conversation as resolved.
Show resolved Hide resolved
!!! compat "Julia 1.7"
Using `auto` together with the environment variable `JULIA_NUM_THREADS` requires at least Julia 1.7.
Lets start Julia with 4 threads:

```bash
Expand Down