In the manual it says to use
$ JULIA_NUM_THREADS=4 ./julia
But how to invoke threads on windows with the julia icon?
In the manual it says to use
$ JULIA_NUM_THREADS=4 ./julia
But how to invoke threads on windows with the julia icon?
Step 1: Create a .cmd file with
set JULIA_NUM_THREADS=4
D:\Julia\Julia-1.3.0\bin\julia.exe
(change the path as required)
Step 2: right-click the Julia icon, go to “properties” and point to the .cmd file
Paul is of course right, just two additional options:
PS C:\Users\ngudat> $env:JULIA_NUM_THREADS = 4
PS C:\Users\ngudat> julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.3.0-rc5.1 (2019-11-17)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> Threads.nthreads()
4
Thanks. Can I not start more Threads than cores on my CPU?
If I set threads to 8 in the batchfile, the number of threads
Threads.nthreads()
will still give 4?
Right. Is it possible to run Threads on my GPU?
That is actually a damn good question…
The short answer: https://juliagpu.gitlab.io/CuArrays.jl/tutorials/generated/intro/