Update script to plot stubbed data and add results for casclakesp2 with AoS
Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
parent
eef44e97d7
commit
e6062e8f79
@ -73,7 +73,7 @@ for stride in plot_data:
|
||||
|
||||
all_sizes = list(all_sizes)
|
||||
all_sizes.sort()
|
||||
all_strides= list(all_strides)
|
||||
all_strides = list(all_strides)
|
||||
all_strides.sort()
|
||||
with open(raw_output_file, 'w') as wp:
|
||||
wp.write(" size\stride")
|
||||
|
@ -9,7 +9,8 @@ def plot_filter(atoms_per_unit_cell):
|
||||
return True
|
||||
|
||||
filename = sys.argv[1]
|
||||
output_file = filename.replace(".txt", ".pdf")
|
||||
plot_output_file = filename.replace(".txt", ".pdf")
|
||||
raw_output_file = filename.replace(".txt", ".csv")
|
||||
fig = plt.figure()
|
||||
ax = plt.axes()
|
||||
plot_data = {}
|
||||
@ -29,16 +30,47 @@ with open(filename, 'r') as fp:
|
||||
plot_data[atoms_per_unit_cell][vol] = cy_per_iter if vol not in plot_data[atoms_per_unit_cell] \
|
||||
else min(cy_per_iter, plot_data[atoms_per_unit_cell][vol])
|
||||
|
||||
all_volumes = set()
|
||||
all_configs = set()
|
||||
for atoms_per_unit_cell in plot_data:
|
||||
volumes = list(plot_data[atoms_per_unit_cell].keys())
|
||||
volumes.sort()
|
||||
cycles = [plot_data[atoms_per_unit_cell][vol] for vol in volumes]
|
||||
ax.plot(volumes, cycles, marker='.', label=str(atoms_per_unit_cell))
|
||||
|
||||
for vol in volumes:
|
||||
all_volumes.add(vol)
|
||||
|
||||
all_configs.add(atoms_per_unit_cell)
|
||||
|
||||
all_volumes = list(all_volumes)
|
||||
all_volumes.sort()
|
||||
all_configs = list(all_configs)
|
||||
all_configs.sort()
|
||||
with open(raw_output_file, 'w') as wp:
|
||||
wp.write(" volume\config")
|
||||
|
||||
for conf in all_configs:
|
||||
wp.write(",{0:14}".format(conf))
|
||||
|
||||
wp.write("\n")
|
||||
|
||||
for vol in all_volumes:
|
||||
wp.write("{:14.6f}".format(vol))
|
||||
for conf in all_configs:
|
||||
try:
|
||||
cycles = plot_data[conf][vol]
|
||||
wp.write(",{:14.6f}".format(cycles))
|
||||
except:
|
||||
wp.write(',' + ' ' * 14)
|
||||
|
||||
|
||||
wp.write("\n")
|
||||
|
||||
ax.vlines([32, 1000, 28000], 0, 1, transform=ax.get_xaxis_transform(), linestyles='dashed', color=['#444444', '#777777', '#aaaaaa'])
|
||||
ax.set(xlabel='Neighbor data volume (kB)', ylabel='Cycles per iteration')
|
||||
ax.set_xscale('log')
|
||||
#ax.set_xticks([32, 1000, 28000])
|
||||
#ax.set_xlim(0, 200000)
|
||||
plt.legend(title="atoms/uc")
|
||||
fig.savefig(output_file, bbox_inches = 'tight', pad_inches = 0)
|
||||
fig.savefig(plot_output_file, bbox_inches = 'tight', pad_inches = 0)
|
||||
|
Loading…
Reference in New Issue
Block a user