Well, as you can see, the system reports only 36 available threads. Hence, the reason why you get 36 for julia -t auto isn’t related to Julia at all but lies deeper. Again, my simple guess would be that hyperthreading is disabled (which would give you precisely the output that you see). Don’t know how to check that from the top of my head but should be easy to find out. You should be able to activate this in the BIOS I guess.
thanks for your help @carstenbauer My use case would benefit from threads as I intend to implement a group of finite state machines. I’m HOPING that Julia is thread safe, I’ll soon find out
Hi @DNF, my understanding was that it is one thread per logical core. Just checked and it looks so. Pls see below. Also it seems that the same situation is in case of @anon69491625 setup.
~$ julia -t auto
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.7.0-rc2 (2021-10-20)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> Threads.nthreads()
128
shell> lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 52 bits physical, 57 bits virtual
CPU(s): 128
On-line CPU(s) list: 0-127
Thread(s) per core: 2
Core(s) per socket: 32
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 106
Model name: Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz
Is there maybe any general rule of thumb? My current assumption is that if there is more intense computation (like computations with higher memory consumption) it is better to use HT and it should bring better results even then JULIA_EXCLUSIVE=1 julia -t (n of physical cores). However, I have not done any extensive testing on this topic.
Yeah, thanks for pointing out to this. I have to admit that I always was starting Julia specifying desired number of threads. So it was a new experiment for me even though my understanding was that Julia auto policy is to set number of threads as equal to number of logical cores (if present), the same with OpenBlas for Julia v. 1.8.