LoopVectorization.jl
LoopVectorization.jl copied to clipboard
False core number on 2 socket HPC node
using Pkg
Pkg.add("VectorizationBase")
Pkg.add("Hwloc")
using VectorizationBase,Hwloc
print(VectorizationBase.num_cores())
print(num_physical_cores())
print(num_virtual_cores())
$srun julia --threads 24 debug.jl
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
No Changes to `~/.julia/environments/v1.7/Project.toml`
No Changes to `~/.julia/environments/v1.7/Manifest.toml`
Resolving package versions...
Updating `~/.julia/environments/v1.7/Project.toml`
[0e44f5e4] + Hwloc v2.0.0
No Changes to `~/.julia/environments/v1.7/Manifest.toml`
static(12)2424
Here for two socket CPU LoopVectorization.jl only use 12 cores.
Not a great suggest, I know, but perhaps you can define
using VectorizationBase, Static
VectorizationBase.num_cores() = static(24)
Older versions of CPUSummary used Hwloc.jl, but using Hwloc crashes Julia when run under wine, so I had to drop it as a dependency.
The solution here is to find another reliable way of figuring out how many sockets there are.
OK thanks very much.