diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-02-27 15:02:54 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-02-27 15:02:54 +0100 |
| commit | 3bdb29dce96cf023532b086768b23a434d62f156 (patch) | |
| tree | 4ed752db48e2ac1d418c96794465cf4e076e7487 | |
| parent | 3b904d13c4717474855c971cbc90b130ad51a6de (diff) | |
| download | allocbench-3bdb29dce96cf023532b086768b23a434d62f156.tar.gz allocbench-3bdb29dce96cf023532b086768b23a434d62f156.zip | |
scale loop runs with number of cpus
| -rw-r--r-- | src/loop.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/loop.py b/src/loop.py index 7e23cd7..1f84959 100644 --- a/src/loop.py +++ b/src/loop.py @@ -11,10 +11,15 @@ class Benchmark_Loop(Benchmark): self.cmd = "loop{binary_suffix} {nthreads} 1000000 {maxsize}" - self.args = { - "maxsize": [2 ** x for x in range(6, 16)], - "nthreads": range(1, multiprocessing.cpu_count() * 2 + 1) - } + cpus = multiprocessing.cpu_count() + steps = 1 + if cpus > 20: + steps = 2 + if cpus > 50: + steps = 5 + + self.args = {"maxsize": [2 ** x for x in range(6, 16)], + "nthreads": range(1, multiprocessing.cpu_count() * 2 + 1, steps)} self.requirements = ["loop"] super().__init__() |
