Reputation: 1995
I am using JuliaPro to work on julia. My test PC has,
Processor Intel(R) Core(TM) i3-1005G1 CPU @ 1.20GHz, 1190 Mhz, 2 Core(s), 4 Logical Processor(s)
When I try to run Threads.nthreads()
it will only show the value of 2. Is this the number of cores or the treads used?
I even tried going into the settings and changing the value of "Number of Threads", however it doesn't affect the number of threads utilized by the software.
Upvotes: 1
Views: 416
Reputation: 1158
You can set the number of threads in 2 ways (assuming Julia 1.5):
julia -t 4
Note that 2 threads for 2 physical cores is probably already the optimal setting, increasing it to 4 probably reduces performace.
Upvotes: 2