This commit is contained in:
Carl Pearson
2017-05-08 14:06:06 -07:00
parent 3100202962
commit 89ac4e1ccc
10 changed files with 65 additions and 7 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 81 KiB

View File

@@ -4,7 +4,7 @@ import matplotlib.pyplot as plt
import math
sns.set(style="white", context="talk")
plt.rcdefaults()
DPI=600
DPI=300
BBOX_INCHES='tight'
def autolabel(ax, rect):
@@ -54,12 +54,12 @@ m2l_ratio = [i/j for i,j in zip(m2l, total)]
l2l_ratio = [i/j for i,j in zip(l2l, total)]
l2p_ratio = [i/j for i,j in zip(l2p, total)]
p2p_ratio = [i/j for i,j in zip(p2p, total)]
ax.bar(x_pos, p2p_ratio, color='0', label='p2p')
ax.bar(x_pos, l2p_ratio, color='0.1', label='l2p', bottom=p2p_ratio)
ax.bar(x_pos, l2l_ratio, color='0.25', label='l2l', bottom=[sum(i) for i in zip(l2p_ratio,p2p_ratio)])
ax.bar(x_pos, m2l_ratio, color='0.40', label='m2l', bottom=[sum(i) for i in zip(l2l_ratio, l2p_ratio,p2p_ratio)])
ax.bar(x_pos, m2m_ratio, color='0.55', label='m2m', bottom=[sum(i) for i in zip(m2l_ratio, l2l_ratio, l2p_ratio,p2p_ratio)])
ax.bar(x_pos, p2m_ratio, color='0.8', label='p2m', bottom=[sum(i) for i in zip(m2m_ratio, m2l_ratio, l2l_ratio, l2p_ratio,p2p_ratio)])
ax.bar(x_pos, p2m_ratio, color='0.75', label='P2M', bottom=[sum(i) for i in zip(m2m_ratio, m2l_ratio, l2l_ratio, l2p_ratio,p2p_ratio)])
ax.bar(x_pos, m2m_ratio, color='0.50', label='M2M', bottom=[sum(i) for i in zip(m2l_ratio, l2l_ratio, l2p_ratio,p2p_ratio)])
ax.bar(x_pos, m2l_ratio, color='0.40', label='M2L', bottom=[sum(i) for i in zip(l2l_ratio, l2p_ratio,p2p_ratio)])
ax.bar(x_pos, l2l_ratio, color='0.25', label='L2L', bottom=[sum(i) for i in zip(l2p_ratio,p2p_ratio)])
ax.bar(x_pos, l2p_ratio, color='0.15', label='L2P', bottom=p2p_ratio)
ax.bar(x_pos, p2p_ratio, color='0', label='P2P')
ax.set_xticks(x_pos)
ax.set_xticklabels(systems)
ax.set_ylabel("MLFMM Kernel Breakdown")
@@ -68,6 +68,11 @@ ax.legend(handles, labels)
# plt.ylim([1, 1e4])
# ax.set_title('How fast do you want to go today?')
sns.despine(trim=True)
legend = plt.legend(frameon = 1)
frame = legend.get_frame()
# frame.set_facecolor('white')
# frame.set_edgecolor('white')
frame.set_alpha(0.9)
plt.savefig(path+'.pdf', bbox_inches=BBOX_INCHES)
plt.savefig(path+'.png', dpi=DPI, bbox_inches=BBOX_INCHES)
print path
@@ -132,5 +137,58 @@ print path
path="figures/mlfmm"
width=0.33
WALLTIME="0.8"
SPEEDUP="0.5"
fig, axes = plt.subplots(2,1)
ax=axes[0]
ax.set_title("(a)")
systems = ('1T', "32T", "1 GPU" ,"4 GPU", "16 GPU")
mlfmm = (1.50e6, 8.64e4, 2.783779e4, 7.01e3, 1.89e3)
num = (45,45,45,45,47)
x_pos = np.arange(len(systems))
rects = ax.bar([p-width/2 for p in x_pos], [i/j for i,j in zip(mlfmm,num)], color=WALLTIME, log=True, width=width)
autolabel(ax, rects[0])
autolabel(ax, rects[1])
autolabel(ax, rects[2])
autolabel(ax, rects[3])
autolabel(ax, rects[4])
ax.set_ylim(1,2e5)
ax2=ax.twinx()
rects = ax2.bar([p+width/2 for p in x_pos], [mlfmm[0] / i for i in mlfmm], color=SPEEDUP, log=True, width=width)
autolabel(ax2, rects[1])
autolabel(ax2, rects[2])
autolabel(ax2, rects[3])
autolabel(ax2, rects[4])
ax2.set_ylim(1,5e3)
ax.set_xticks(x_pos)
ax.set_xticklabels(systems)
ax=axes[1]
ax.set_title("(b)")
systems = ('1T', "160T", "1 GPU" ,"4 GPU")
mlfmm = [1.25e6, 4.84e4, 5.22e3, 1.29e3]
num = (44,44,44,44)
x_pos = np.arange(len(systems))
rects = ax.bar([p-width/2 for p in x_pos], [i/j for i,j in zip(mlfmm,num)], color=WALLTIME, log=True, width=width)
autolabel(ax, rects[0])
autolabel(ax, rects[1])
autolabel(ax, rects[2])
autolabel(ax, rects[3])
ax.set_ylim(1,2e5)
ax2=ax.twinx()
rects = ax2.bar([p+width/2 for p in x_pos], [mlfmm[0] / i for i in mlfmm], color=SPEEDUP, log=True, width=width)
autolabel(ax2, rects[1])
autolabel(ax2, rects[2])
autolabel(ax2, rects[3])
ax2.set_ylim(1,5e3)
ax.set_xticks(x_pos)
ax.set_xticklabels(systems)
fig.text(-0.01, 0.5, "Per-MLFMM Execution Time (ms)", va='center', rotation='vertical')
fig.text(0.99, 0.5, "Speedup over 1T", va='center', rotation='vertical')
fig.tight_layout()
plt.savefig(path+'.pdf', bbox_inches=BBOX_INCHES)
plt.savefig(path+'.png', dpi=DPI, bbox_inches=BBOX_INCHES)
print path