aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Kacur <jkacur@redhat.com>2019-12-10 02:23:10 +0100
committerJohn Kacur <jkacur@redhat.com>2019-12-10 02:23:10 +0100
commit3c6483c6e6e24a3e457c631f031f83e81b5e930c (patch)
tree91c25a2d2008212e0bad3e9a6ec2063a54b0dee6
parentba69dfd96da37208c63313ecab233a39568d576c (diff)
downloadrteval-3c6483c6e6e24a3e457c631f031f83e81b5e930c.tar.gz
rteval: hackbench Fix interating through nodes
Fix iterating through the nodes in hackbench. When creating a dictionary of node, cpus, we need to iterate through the nodes and not through sysTop alone. Also use python3 syntax for iterating through a dictionary. Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r--rteval/modules/loads/hackbench.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py
index f31e29d..d951d1a 100644
--- a/rteval/modules/loads/hackbench.py
+++ b/rteval/modules/loads/hackbench.py
@@ -61,7 +61,7 @@ class Hackbench(CommandLineLoad):
# get the cpus for each node
self.cpus = {}
biggest = 0
- for n in sysTop:
+ for n in sysTop.getnodes():
self.cpus[n] = sysTop.getcpus(int(n))
# if a cpulist was specified, only allow cpus in that list on the node
if self.cpulist:
@@ -73,7 +73,7 @@ class Hackbench(CommandLineLoad):
biggest = node_biggest
# remove nodes with no cpus available for running
- for node,cpus in self.cpus.items():
+ for node,cpus in list(self.cpus.items()):
if not cpus:
self.nodes.remove(node)
self._log(Log.DEBUG, "node %s has no available cpus, removing" % node)