User: knarf Date: 2011/11/13 01:23 AM
Added: /cactus-benchmarks/ plot_defaults.py, results-best.py
Log: started working on this figure
Directory Changes:
Directory: /svn:executable/ ===========================
+ * Directory: /svn:special/ ========================
+ *
File Changes:
Directory: /cactus-benchmarks/ ==============================
File [added]: plot_defaults.py Delta lines: +1 -0 =================================================================== --- cactus-benchmarks/plot_defaults.py (rev 0) +++ cactus-benchmarks/plot_defaults.py 2011-11-13 07:23:23 UTC (rev 190) @@ -0,0 +1 @@ +link ../plot_defaults.py \ No newline at end of file
Property changes on: cactus-benchmarks/plot_defaults.py ___________________________________________________________________
File [added]: results-best.py Delta lines: +73 -0 =================================================================== --- cactus-benchmarks/results-best.py (rev 0) +++ cactus-benchmarks/results-best.py 2011-11-13 07:23:23 UTC (rev 190) @@ -0,0 +1,73 @@ +#!/usr/bin/python + +# Plot evolution of central density +from plot_defaults import * + +# todo: Zeilenabstand Legende +# X-Achse in 2^x beschriften + + +# stuff +xlim = (10,15000) +ylim = (0,40) + +# load data +def load_machine(machine, filters): + steps,size,procs,ppn,tpp,itera,walltime = np.loadtxt("results-"+machine+".out", comments="#", usecols=(1,2,4,5,6,7,8), unpack=True) + fields={'steps' : 0, + 'size' : 1, + 'procs' : 2, + 'ppn' : 3, + 'tpp' : 4, + 'iter' : 5, + 'walltime' : 6, + } + for field in filters: + (steps,size,procs,ppn,tpp,itera,walltime)=np.array(filter(lambda x: + eval('x['+str(fields[field])+']'+filters[field]), + np.array([steps,size,procs,ppn,tpp,itera,walltime]).T)).T + return (procs, walltime/25**3/128/2/4*1.e6) + +# Plot basics +fig = plt.figure(figsize=(6, 3)) +fig.subplots_adjust(top=0.85, bottom=0.16, left=0.11,right=0.97) +ax = fig.add_subplot(1,1,1) + +# plot +Fx,Fy = load_machine('franklin', {'steps': '==128', 'size': '==25', 'procs': '>=16', 'tpp': '==1', 'iter': '==0'}) +ax.semilogx(Fx, Fy, linestyle='-', marker='+', color='red', label='Franklin') + +Fx,Fy = load_machine('hlrb2', {'steps': '==128', 'size': '==25', 'procs': '>=16', 'tpp': '==1', 'iter': '==10'}) +ax.semilogx(Fx, Fy, linestyle='--', marker='x', color='green', label='HLRB II') + +Fx,Fy = load_machine('kraken', {'steps': '==128', 'size': '==25', 'ppn': '==4', 'procs': '>=16', 'tpp': '==1', 'iter': '==50'}) +ax.semilogx(Fx, Fy, linestyle='--', marker='*', color='blue', label='Kraken') + +Fx,Fy = load_machine('queenbee', {'steps': '==128', 'size': '==25', 'ppn': '==8', 'procs': '>=16', 'tpp': '==2', 'iter': '==0'}) +ax.semilogx(Fx, Fy, linestyle='--', marker='s', color='purple', label='Queen Bee') + +Fx,Fy = load_machine('ranger', {'steps': '==128', 'size': '==25', 'ppn':'==16', 'procs': '>=16', 'tpp': '==1', 'iter': '==71'}) +ax.semilogx(Fx, Fy, linestyle='-', marker='s', color='black', label='Ranger') + +# plot properties +ax.set_xlim(xlim) +ax.set_ylim(ylim) + +#plt.title('PSD', fontsize=fontsize) + +ax.set_xlabel(r'Number of cores') +#ax.xaxis.set_major_locator(mticker.MaxNLocator(7)) +#ax.xaxis.set_minor_locator(mticker.MaxNLocator(14)) +ax.xaxis.grid(False) +ax.set_ylabel(r'time per RHS evalutation $[\mu s]$') +ax.yaxis.set_major_locator(mticker.MaxNLocator(5)) +ax.yaxis.set_minor_locator(mticker.MaxNLocator(10)) +ax.yaxis.grid(False) +set_tick_sizes(ax, 8, 4) + +handles, labels = ax.get_legend_handles_labels() +leg = ax.legend(handles, labels, loc='best', handlelength=4) + +#plt.show() +plt.savefig('test.pdf') +
Property changes on: cactus-benchmarks/results-best.py ___________________________________________________________________
commits@lists.einsteintoolkit.org