Skip to content

Commit

Permalink
Improve documentation for JULIA_NUM_THREADS=auto (#42501)
Browse files Browse the repository at this point in the history
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com>
  • Loading branch information
3 people authored Oct 10, 2021
1 parent b483c6d commit a8d42eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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.

!!! 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

0 comments on commit a8d42eb

Please sign in to comment.