diff --git a/Isosurfacing_3/benchmark/Isosurfacing_3/benchmark_threads.py b/Isosurfacing_3/benchmark/Isosurfacing_3/benchmark_threads.py index 5b2b46630eb..e53c26236ed 100644 --- a/Isosurfacing_3/benchmark/Isosurfacing_3/benchmark_threads.py +++ b/Isosurfacing_3/benchmark/Isosurfacing_3/benchmark_threads.py @@ -13,7 +13,7 @@ build(scenario, kernel, algorithm, tag) data = [] -for t in range(min_threads, max_threads): +for t in range(min_threads, max_threads + 1): res = execute(n, t, times=5) data.append([scenario, kernel, algorithm, tag, t, cells, res["time"], res["bandwidth"]]) diff --git a/Isosurfacing_3/benchmark/Isosurfacing_3/benchmark_util.py b/Isosurfacing_3/benchmark/Isosurfacing_3/benchmark_util.py index 5d207e30e59..f1474aeccde 100644 --- a/Isosurfacing_3/benchmark/Isosurfacing_3/benchmark_util.py +++ b/Isosurfacing_3/benchmark/Isosurfacing_3/benchmark_util.py @@ -47,27 +47,27 @@ def execute(n, threads, times=1): if m is not None: measurements["points"] += int(m.group(1)) - m = re.search(r'Memory bandwidth.*\s+(\d+(\.\d+)?) |\s*$', line) + m = re.search(r'Memory bandwidth.*\s+(\d+(\.\d+)?) \|\s*$', line) if m is not None: - measurements["bandwidth"] += int(m.group(1)) + measurements["bandwidth"] += float(m.group(1)) - m = re.search(r'Memory data volume.*\s+(\d+(\.\d+)?) |\s*$', line) + m = re.search(r'Memory data volume.*\s+(\d+(\.\d+)?) \|\s*$', line) if m is not None: - measurements["transfer"] += int(m.group(1)) + measurements["transfer"] += float(m.group(1)) - m = re.search(r'DP.*\s+(\d+(\.\d+)?) |\s*$', line) + m = re.search(r'DP.*\s+(\d+(\.\d+)?) \|\s*$', line) if m is not None: - measurements["performance"] += int(m.group(1)) + measurements["performance"] += float(m.group(1)) - m = re.search(r'Clock.*\s+(\d+(\.\d+)?) |\s*$', line) + m = re.search(r'Clock.*\s+(\d+(\.\d+)?) \|\s*$', line) if m is not None: - measurements["clock"] += int(m.group(1)) + measurements["clock"] += float(m.group(1)) - m = re.search(r'Operational intensity.*\s+(\d+(\.\d+)?) |\s*$', line) + m = re.search(r'Operational intensity.*\s+(\d+(\.\d+)?) \|\s*$', line) if m is not None: - measurements["intensity"] += int(m.group(1)) + measurements["intensity"] += float(m.group(1)) - for key, value in measurements: - measurements[key] = value / times + for item in measurements.items(): + measurements[item[0]] = item[1] / times return measurements \ No newline at end of file diff --git a/Isosurfacing_3/benchmark/Isosurfacing_3/graphs.py b/Isosurfacing_3/benchmark/Isosurfacing_3/graphs.py index b19e961f231..f6029506b2f 100644 --- a/Isosurfacing_3/benchmark/Isosurfacing_3/graphs.py +++ b/Isosurfacing_3/benchmark/Isosurfacing_3/graphs.py @@ -23,6 +23,12 @@ def add_size_graph(data, label): plt.plot(x, y, label=label) plt.legend() +def add_triangle_graph(data, label, factor): + x = data["cells"] + y = data["polygons"] * factor + plt.plot(x, y, label=label) + plt.legend() + def plot_graph(file, name, log, ylabel, xlabel): plt.title(name)