Is there any drawback to always launching julia with the number of existing cpu cores?
Suppose my cpu has 4 cores, and I need to do some non-production stuff like debugging, etc:
# cpu with 4 cores
firefox &
export JULIA_NUM_THREADS=4 && julia
Is there any drawback to always launching julia with the number of existing cpu cores?
Suppose my cpu has 4 cores, and I need to do some non-production stuff like debugging, etc:
# cpu with 4 cores
firefox &
export JULIA_NUM_THREADS=4 && julia
leandro@pitico:~% julia -t auto
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.5.3 (2020-11-09)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> Threads.nthreads()
8
julia>
A drawback? No, only your Julia will compete with the other processes of your computer.
Actually there can julia can also compete with itself if one uses julia treads and BLAS, which by default has its own thread pool