Skip to content

Commit

Permalink
bump SysInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
carstenbauer committed Aug 8, 2024
1 parent dbd0d4f commit 3a0abcc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ SysInfo = "90a7ee08-a23f-48b9-9006-0e0e2a9e4608"
ThreadPinningCore = "6f48bc29-05ce-4cc8-baad-4adcba581a18"

[weakdeps]
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"

[extensions]
MPIExt = "MPI"
DistributedExt = "Distributed"
MPIExt = "MPI"

[compat]
DelimitedFiles = "1"
Expand All @@ -34,7 +34,7 @@ PrecompileTools = "1"
Preferences = "1"
Random = "1"
StableTasks = "0.1.2"
SysInfo = "0.2.5"
SysInfo = "0.3"
TestItemRunner = "0.2"
ThreadPinningCore = "0.4.5"
julia = "1.10"
Expand Down
28 changes: 14 additions & 14 deletions test/tests_likwid-pin.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,27 @@ function likwidpin_tests()
@testset "likwid-pin: domain-based" begin
# logical order, physical cores first(!), starts with 0(!)
@testset "domain:explicit" begin
if SysInfo.ncputhreads_within_numa(1) >= 4
if SysInfo.ncputhreads_of_numa(1) >= 4
for lpstr in ("N:0-3", "N:0,1,2,3", "S0:0-3", "S0:0,1,2,3", "M0:0-3",
"M0:0,1,2,3") # 4 threads to first 4 cores in node
pinthreads_cpuids = ThreadPinning.LIKWID.likwidpin_to_cpuids(lpstr)
@test pinthreads_cpuids[1:4] == node(1:4)
end
end
if nsockets() > 1 && SysInfo.ncputhreads_within_socket(2) >= 4
if nsockets() > 1 && SysInfo.ncputhreads_of_socket(2) >= 4
lpstr = "S1:0-3"
pinthreads_cpuids = ThreadPinning.LIKWID.likwidpin_to_cpuids(lpstr)
@test pinthreads_cpuids[1:4] == socket(2, 1:4)
end
if nnuma() > 1 && SysInfo.ncputhreads_within_numa(2) >= 4
if nnuma() > 1 && SysInfo.ncputhreads_of_numa(2) >= 4
lpstr = "M1:0,1,2,3"
pinthreads_cpuids = ThreadPinning.LIKWID.likwidpin_to_cpuids(lpstr)
@test pinthreads_cpuids[1:4] == numa(2, 1:4)
end
end

@testset "domain:scatter[:numthreads]" begin
if SysInfo.ncputhreads_within_numa(1) >= 4
if SysInfo.ncputhreads_of_numa(1) >= 4
for lpstr in ("S0:scatter", "M0:scatter", "N:scatter")
pinthreads_cpuids = ThreadPinning.LIKWID.likwidpin_to_cpuids(lpstr)
@test pinthreads_cpuids[1:4] == node(1:4)
Expand Down Expand Up @@ -100,7 +100,7 @@ function likwidpin_tests()
end

@testset "likwid-pin: expression" begin
if SysInfo.ncputhreads_within_numa(1) >= 4
if SysInfo.ncputhreads_of_numa(1) >= 4
@testset "E:domain:numthreads" begin
for lpstr in ("E:N:3", "E:S0:3", "E:M0:3")
pinthreads_cpuids = ThreadPinning.LIKWID.likwidpin_to_cpuids(lpstr)
Expand All @@ -122,7 +122,7 @@ function likwidpin_tests()
end

@testset "likwidpin: @ concatenation" begin
if SysInfo.ncputhreads_within_socket(1) >= 4
if SysInfo.ncputhreads_of_socket(1) >= 4
let lpstr = "S0:0-1@S0:2-3"
pinthreads_cpuids = ThreadPinning.LIKWID.likwidpin_to_cpuids(lpstr)
@test pinthreads_cpuids[1:4] == socket(1, 1:4)
Expand All @@ -132,22 +132,22 @@ function likwidpin_tests()
@test pinthreads_cpuids[1:4] == socket(1, 1:4)
end
end
if nsockets() > 1 && SysInfo.ncputhreads_within_socket(1) >= 2 &&
SysInfo.ncputhreads_within_socket(2) >= 2
if nsockets() > 1 && SysInfo.ncputhreads_of_socket(1) >= 2 &&
SysInfo.ncputhreads_of_socket(2) >= 2
let lpstr = "S0:0-1@S1:1-2" # 2 threads per socket
pinthreads_cpuids = ThreadPinning.LIKWID.likwidpin_to_cpuids(lpstr)
@test pinthreads_cpuids[1:4] == vcat(socket(1, 1:2), socket(2, 2:3))
end
end
if nnuma() > 1 && SysInfo.ncputhreads_within_numa(1) >= 2 &&
SysInfo.ncputhreads_within_numa(2) >= 2
if nnuma() > 1 && SysInfo.ncputhreads_of_numa(1) >= 2 &&
SysInfo.ncputhreads_of_numa(2) >= 2
let lpstr = "M0:0-1@M1:1-2" # 2 threads per memory domain
pinthreads_cpuids = ThreadPinning.LIKWID.likwidpin_to_cpuids(lpstr)
@test pinthreads_cpuids[1:4] == vcat(numa(1, 1:2), numa(2, 2:3))
end
end
if nnuma() > 1 && nsockets() > 1 && SysInfo.ncputhreads_within_numa(1) >= 2 &&
SysInfo.ncputhreads_within_socket(2) >= 2
if nnuma() > 1 && nsockets() > 1 && SysInfo.ncputhreads_of_numa(1) >= 2 &&
SysInfo.ncputhreads_of_socket(2) >= 2
let lpstr = "M0:0-1@S1:1-2"
pinthreads_cpuids = ThreadPinning.LIKWID.likwidpin_to_cpuids(lpstr)
@test pinthreads_cpuids[1:4] == vcat(numa(1, 1:2), socket(2, 2:3))
Expand All @@ -156,10 +156,10 @@ function likwidpin_tests()
end

@testset "pinthreads_likwidpin" begin
if SysInfo.ncputhreads_within_socket(1) >= 4
if SysInfo.ncputhreads_of_socket(1) >= 4
@test isnothing(pinthreads_likwidpin("S0:0-3"))
end
if SysInfo.nnuma() > 1 && SysInfo.ncputhreads_within_numa(2) >= 5
if SysInfo.nnuma() > 1 && SysInfo.ncputhreads_of_numa(2) >= 5
@test isnothing(pinthreads_likwidpin("M1:0,2,4"))
end
end
Expand Down

0 comments on commit 3a0abcc

Please sign in to comment.