aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-11-28 14:11:09 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-11-28 14:11:09 +0100
commit53ac585bea0a606e39e4d87a917732f506757150 (patch)
tree40d082c4fe171c2c1b68401d407a4918713c8039
parenta0ea8d7bf5bc880877ca1b8de8dfc60c6b508e4c (diff)
downloadallocbench-53ac585bea0a606e39e4d87a917732f506757150.tar.gz
allocbench-53ac585bea0a606e39e4d87a917732f506757150.zip
fix scale factor > 0 for systems with more than 10 cpus
-rw-r--r--src/benchmark.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/benchmark.py b/src/benchmark.py
index 8abfbc4..15c4fee 100644
--- a/src/benchmark.py
+++ b/src/benchmark.py
@@ -60,7 +60,7 @@ class Benchmark:
Return a list of numbers between start and multiprocessing.cpu_count() * factor
with len <= steps."""
- max_threads = multiprocessing.cpu_count() * factor
+ max_threads = int(multiprocessing.cpu_count() * factor)
if steps > max_threads - min_threads + 1:
return list(range(min_threads, int(max_threads) + 1))
@@ -73,7 +73,7 @@ class Benchmark:
if entries > steps - 1:
return sorted(list(set([min_threads] + nthreads + [max_threads])))
- nthreads = [(i + 1) * factor for i in range(entries)]
+ nthreads = [int((i + 1) * factor) for i in range(int(entries))]
divider *= 2
@staticmethod