From 2e0f430aa030c8862867d729004cf8726dcd679b Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Tue, 31 Oct 2023 19:36:13 +0100 Subject: [PATCH] Use different way to select all HW threads of a socket. Fixes #501 --- src/applications/likwid-powermeter.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/likwid-powermeter.lua b/src/applications/likwid-powermeter.lua index 3f476bf74..df05c7a00 100644 --- a/src/applications/likwid-powermeter.lua +++ b/src/applications/likwid-powermeter.lua @@ -160,14 +160,14 @@ after = {} sock_cpulist = {} if #sockets == 0 then for i, domain in pairs(affinity["domains"]) do - if domain["tag"]:match("S%d+") then + if domain["tag"]:match("S%d+") and domain["numberOfProcessors"] > 0 then sid = domain["tag"]:match("S(%d+)") table.insert(sockets, sid) end end end for i, sid in pairs(sockets) do - pin = string.format("S%s:0-%d", tostring(sid), cputopo["numCoresPerSocket"]-1) + pin = string.format("S%s", tostring(sid)) _, sock_cpulist[sid] = likwid.cpustr_to_cpulist(pin) before[sock_cpulist[sid][1]] = {} after[sock_cpulist[sid][1]] = {}