aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValentin Schneider <vschneid@redhat.com>2022-08-05 14:42:39 +0100
committerJohn Kacur <jkacur@redhat.com>2022-08-05 12:50:46 -0400
commit823870b5a28ead45881b3f400028b61217854dae (patch)
tree19c69afa8881fef7bbed6dbb2830309d396cc14d
parentab0ac019ebfdb397ce57d185b5b97d0ae7928fe4 (diff)
downloadrteval-823870b5a28ead45881b3f400028b61217854dae.tar.gz
rteval: Fix loads cpulist restriction
A recent batch of commits, one of them being: 39115f0a826d ("rteval: Make use of systopology instead of misc in hackbench") has made the loads modules use CpuList.expand_cpulist() (which produces a list(int)) instead of misc.expand_cpulist() (which produces a list(str)). However, the bits handling restricting CPU affinity based on a user argument still expects to handle a list(str), which results in: [DEBUG] [kcompile] node 0 has no available cpus, removing [...] [DEBUG] [hackbench] node 0 has no available cpus, removing Remove the leftover string casts. Cyclictest is unaffected. Signed-off-by: Valentin Schneider <vschneid@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r--rteval/modules/loads/hackbench.py2
-rw-r--r--rteval/modules/loads/kcompile.py2
-rw-r--r--rteval/modules/loads/stressng.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py
index 538f60f..14e60d1 100644
--- a/rteval/modules/loads/hackbench.py
+++ b/rteval/modules/loads/hackbench.py
@@ -76,7 +76,7 @@ class Hackbench(CommandLineLoad):
self.cpus[n] = sysTop.getcpus(int(n))
# if a cpulist was specified, only allow cpus in that list on the node
if self.cpulist:
- self.cpus[n] = [c for c in self.cpus[n] if str(c) in expand_cpulist(self.cpulist)]
+ self.cpus[n] = [c for c in self.cpus[n] if c in expand_cpulist(self.cpulist)]
# track largest number of cpus used on a node
node_biggest = len(sysTop.getcpus(int(n)))
diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
index 7d78d0f..6faa686 100644
--- a/rteval/modules/loads/kcompile.py
+++ b/rteval/modules/loads/kcompile.py
@@ -235,7 +235,7 @@ class Kcompile(CommandLineLoad):
# if a cpulist was specified, only allow cpus in that list on the node
if self.cpulist:
- self.cpus[n] = [c for c in self.cpus[n] if str(c) in expand_cpulist(self.cpulist)]
+ self.cpus[n] = [c for c in self.cpus[n] if c in expand_cpulist(self.cpulist)]
# remove nodes with no cpus available for running
for node, cpus in self.cpus.items():
diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py
index 287f4e2..85cb473 100644
--- a/rteval/modules/loads/stressng.py
+++ b/rteval/modules/loads/stressng.py
@@ -68,7 +68,7 @@ class Stressng(CommandLineLoad):
cpus[n] = systop.getcpus(int(n))
# if a cpulist was specified, only allow cpus in that list on the node
if self.cpulist:
- cpus[n] = [c for c in cpus[n] if str(c) in expand_cpulist(self.cpulist)]
+ cpus[n] = [c for c in cpus[n] if c in expand_cpulist(self.cpulist)]
# remove nodes with no cpus available for running
for node, cpu in cpus.items():