rteval/SOURCES/rteval-node-in-args-to-Popen-must-be-a-string.patch
2022-02-03 05:24:03 +00:00

55 lines
2.3 KiB
Diff

From ba69dfd96da37208c63313ecab233a39568d576c Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Mon, 2 Dec 2019 13:05:02 +0100
Subject: [PATCH] rteval: node in args to Popen must be a string
In hackbench.py, the args to Popen must be a string and not an integer
Before this change, this can happen.
rteval --duration=1m
got system topology: 2 node system (10 cores per node)
rteval run on 4.18.0-151.rt13.8.el8.x86_64 started at Tue Nov 26 14:42:18 2019
started 2 loads on 20 cores with 2 numa nodes
started measurement threads on 20 cores
Run duration: 60.0 seconds
Exception in thread hackbench:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/site-packages/rteval/modules/__init__.py", line 188, in run
self._WorkloadTask()
File "/usr/lib/python3.6/site-packages/rteval/modules/loads/hackbench.py", line 147, in _WorkloadTask
self.tasks[n] = self.__starton(n)
File "/usr/lib/python3.6/site-packages/rteval/modules/loads/hackbench.py", line 134, in __starton
stderr=self.__err)
File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/usr/lib64/python3.6/subprocess.py", line 1295, in _execute_child
restore_signals, start_new_session, preexec_fn)
TypeError: expected str, bytes or os.PathLike object, not int
After converting the node to a string, it works as expected
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/modules/loads/hackbench.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py
index b15ea6378310..f31e29dd3f13 100644
--- a/rteval/modules/loads/hackbench.py
+++ b/rteval/modules/loads/hackbench.py
@@ -120,7 +120,7 @@ class Hackbench(CommandLineLoad):
def __starton(self, node):
if self.__multinodes or self.cpulist:
if self.__usenumactl:
- args = [ 'numactl', '--cpunodebind', node ] + self.args
+ args = [ 'numactl', '--cpunodebind', str(node) ] + self.args
else:
cpulist = ",".join([ str(n) for n in self.cpus[node] ])
args = ['taskset', '-c', cpulist ] + self.args
--
2.20.1