carstenbauer / ThreadPinning.jl

Readily pin Julia threads to CPU-threads
https://carstenbauer.github.io/ThreadPinning.jl/
MIT License
106 stars 7 forks source link

`bench_core2core_latency` assumes threads IDs don't exceed `Sys.CPU_THREADS` #76

Closed giordano closed 1 year ago

giordano commented 1 year ago

This isn't true on Fugaku:

julia> ThreadPinning.bench_core2core_latency(12:59)
┌ Error: CPU IDs must all be non-negative and ≤ Sys.CPU_THREADS.
└ @ ThreadPinning /data/ra000019/a04463/julia-depot/packages/ThreadPinning/CWweM/src/latency.jl:18
┌ Error: CPU IDs must all be non-negative and ≤ Sys.CPU_THREADS.
└ @ ThreadPinning /data/ra000019/a04463/julia-depot/packages/ThreadPinning/CWweM/src/latency.jl:18
┌ Error: CPU IDs must all be non-negative and ≤ Sys.CPU_THREADS.
└ @ ThreadPinning /data/ra000019/a04463/julia-depot/packages/ThreadPinning/CWweM/src/latency.jl:18
┌ Error: CPU IDs must all be non-negative and ≤ Sys.CPU_THREADS.
└ @ ThreadPinning /data/ra000019/a04463/julia-depot/packages/ThreadPinning/CWweM/src/latency.jl:18
┌ Error: CPU IDs must all be non-negative and ≤ Sys.CPU_THREADS.
└ @ ThreadPinning /data/ra000019/a04463/julia-depot/packages/ThreadPinning/CWweM/src/latency.jl:18
┌ Error: CPU IDs must all be non-negative and ≤ Sys.CPU_THREADS.
└ @ ThreadPinning /data/ra000019/a04463/julia-depot/packages/ThreadPinning/CWweM/src/latency.jl:18
┌ Error: CPU IDs must all be non-negative and ≤ Sys.CPU_THREADS.
└ @ ThreadPinning /data/ra000019/a04463/julia-depot/packages/ThreadPinning/CWweM/src/latency.jl:18
┌ Error: CPU IDs must all be non-negative and ≤ Sys.CPU_THREADS.
└ @ ThreadPinning /data/ra000019/a04463/julia-depot/packages/ThreadPinning/CWweM/src/latency.jl:18
┌ Error: CPU IDs must all be non-negative and ≤ Sys.CPU_THREADS.
└ @ ThreadPinning /data/ra000019/a04463/julia-depot/packages/ThreadPinning/CWweM/src/latency.jl:18

julia> Sys.CPU_THREADS
50

julia> ThreadPinning.cpuids_all()
50-element Vector{Int64}:
  0
  1
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
carstenbauer commented 1 year ago

Fixed in version 0.7.10