LoopVectorization.jl icon indicating copy to clipboard operation
LoopVectorization.jl copied to clipboard

False core number on 2 socket HPC node

Open Lightup1 opened this issue 3 years ago • 2 comments

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.

Lightup1 avatar May 20 '22 10:05 Lightup1

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.

chriselrod avatar May 20 '22 15:05 chriselrod

OK thanks very much.

Lightup1 avatar May 20 '22 15:05 Lightup1