Before Julia 1.10, number of threads reported by versioninfo()
was correct. For example, when started with 8 threads, Julia 1.9.4 shows the following:
julia> versioninfo()
Julia Version 1.9.4
Commit 8e5136fa297 (2023-11-14 08:46 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 16 ร 12th Gen Intel(R) Core(TM) i5-1240P
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, alderlake)
Threads: 8 on 16 virtual cores
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS = 8
JULIA_PKG_USE_CLI_GIT = true
JULIA_IMAGE_THREADS = 1
However, with Julia 1.10, the number of threads within Platform Info is reported as 11 instead of 8.
julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 16 ร 12th Gen Intel(R) Core(TM) i5-1240P
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, alderlake)
Threads: 11 on 16 virtual cores
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS = 8
JULIA_PKG_USE_CLI_GIT = true
Is this a bug or am I missing something?
1 Like
nsajko
January 3, 2024, 9:27am
2
Some threads are GC threads: Command-line Interface ยท The Julia Language
On the master Git branch (the future v1.11), versioninfo()
is finer grained, when started with ./julia -t5
, versioninfo()
outputs Threads: 5 default, 0 interactive, 2 GC (on 8 virtual cores)
.
1 Like
nilshg
January 3, 2024, 9:39am
3
This was improved here by Ian:
JuliaLang:master
โ IanButterworth:ib/versioninfo_threads
opened 03:42PM - 06 Dec 23 UTC
Fixes https://github.com/JuliaLang/julia/issues/52404
@nilshg I opted to make iโฆ t one line as it fits.
```
julia> versioninfo()
Julia Version 1.11.0-DEV.1011
Commit bb7091c6f2* (2023-12-04 14:58 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin23.0.0)
CPU: 10 ร Apple M2 Pro
WORD_SIZE: 64
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores)
Environment:
JULIA_EDITOR = code
```
2 Likes
I see. Thanks for sharing the link!
Starting Julia with --gcthreads=1
seems to fix the issue.
$ julia -t 8 --gcthreads 1 -q
julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 16 ร 12th Gen Intel(R) Core(TM) i5-1240P
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, alderlake)
Threads: 8 on 16 virtual cores
Environment:
JULIA_PKG_USE_CLI_GIT = true