Commit 979e0216 authored by lmeinen's avatar lmeinen
Browse files

generated plots for multi-node lu: 32 ranks w 1 thread

parent f449b059
......@@ -229,13 +229,19 @@ def plot_speedup_summary_graphs():
print("\nGenerating speedup summary plots...")
for size, experiments in graphs.items():
base_time = None
if 'single-node' in experiments.items():
t_base_time = None
num_t_base_time = None
if 'single-node' in experiments.keys():
measurements = experiments['single-node']
for t, points in measurements:
if 'sequential' in t.lower() and points:
# speedup relative to sequential execution time
base_time = points[0][1]
t_base_time = t.lower()
num_t_base_time = 1
for node_setup, measurements in experiments.items():
if measurements:
......@@ -246,10 +252,12 @@ def plot_speedup_summary_graphs():
# Base time is slowest implementation on 1 (or 4 on multi-node) thread
min_threads = 2 if node_setup == 'single-node' else 4
base_time = 0
for _, points in measurements:
for t, points in measurements:
for x, y in points:
if x == min_threads and y > base_time:
base_time = y
t_base_time = t.lower()
num_t_base_time = x
for t, points in measurements:
x, y = zip(*points)
......@@ -269,8 +277,10 @@ def plot_speedup_summary_graphs():
plt.ylabel('Speedup')
# giving a title to my graph
title = 'Speedups of {} implemenations with matrix size {} relative to {} ms'.format(
node_setup, size, '%.3f' % base_time)
# title = 'Speedups of {} implemenations with matrix size {} relative to {} ms'.format(
# node_setup, size, '%.3f' % base_time)
title = 'Speedups of {} implemenations with matrix size {} relative to {} on {} {}'.format(
node_setup, size, t_base_time, num_t_base_time, 'ranks' if 'multi-node' in node_setup else 'threads')
plt.title(title, wrap=True)
plt.legend()
......@@ -384,8 +394,9 @@ def preprocess(df: DataFrame) -> Tuple[int, DataFrame, Tuple[int, int], float]:
z = 1.96
rankLow = math.floor((n-z*np.sqrt(n))/2)
rankHigh = math.floor(1 + (n+z*np.sqrt(n))/2)
ci_par = (df['execution_time'].iloc[rankLow]*0.001,
df['execution_time'].iloc[rankHigh-1]*0.001)
if not 'sequential' in df['type'].iloc[0].lower():
ci_par = (df['execution_time'].iloc[rankLow]*0.001,
df['execution_time'].iloc[rankHigh-1]*0.001)
return m, df, ci, diff
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment