Skip to content

Commit

Permalink
Fix --cpuset
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha authored and parttimenerd committed Jul 21, 2020
1 parent d1a3ab5 commit c972086
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions temci/run/cpuset.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def move_process_to_set(self, pid: int, set_id: int):

def get_sub_set(self, set_id: int) -> str:
""" Gets the name of the benchmarking cpu set with the given id / number (starting at zero). """
if self.parallel == 0:
return CONTROLLER_SUB_BENCH_SET
if self.active:
typecheck(set_id, Int(range=range(0, self.parallel_number)))
return SUB_BENCH_SET.format(set_id)
Expand Down
2 changes: 1 addition & 1 deletion temci/run/run_worker_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def submit(self, block: RunProgramBlock, id: int, runs: int):
typecheck(runs, NaturalNumber())
typecheck(id, NaturalNumber())
block.is_enqueued = True
self.result_queue.put((block, self.run_driver.benchmark(block, runs, timeout=self.next_block_timeout()), id))
self.result_queue.put((block, self.run_driver.benchmark(block, runs, self.cpuset, timeout=self.next_block_timeout()), id))
block.is_enqueued = False

def results(self, expected_num: int) -> ResultGenerator:
Expand Down

0 comments on commit c972086

Please sign in to comment.