def print_pt(pt): print(pt[1]), print "\t\t\t", (navg, nstddev) = pt[2] print( human_readable.percent(navg) + "%\t\t\t" + human_readable.percent(nstddev) + "%\t\t\t" + human_readable.speedup(pt[3]) + "\t\t\t" + human_readable.speedup(pt[4]))
def print_compare_normalized(experiment_id, n_procs): problem_name = get.problem_name_of_experiment(experiment_id) print("Problem: " + problem_name) print("Number of Cores: " + str(n_procs)) ((binput, bps, bspeedup, mltspeedup, mltlbsovhd, seqpmlcvsmlton, berror, lbs_ovhd, (bavg, bstddev)), norms) = compare_normalized(experiment_id, n_procs) print("Best splitting strategy: " + bps + " (Error= " + human_readable.percent(berror) + "%) (Speedup vs. SeqPMLC= " + human_readable.speedup(bspeedup) + ") (Speedup vs. mlton= " + human_readable.speedup(mltspeedup) + ")") print("Overhead of LBS vs. NS (PMLC)= " + human_readable.percent(lbs_ovhd)) + '%' print("Overhead of LBS vs. NS (mlton)= " + human_readable.percent(mltlbsovhd)) + '%' print("Sequential PMLC vs. mlton (both NS)= " + human_readable.percent(seqpmlcvsmlton) + "%") print( "Splitting strategy\t\tPct. slower\t\tError\t\t\tSpeedup vs. SeqPMLC\tSpeedup vs. mlton" ) for norm in norms: print_pt(norm)
# Adam Shaw, November 2009 # run this with 'python speedup.py' # Please see EDIT ME! below for customization. import numpy as np import matplotlib.pyplot as plt import matplotlib.font_manager as fm import utils import rope_splitting_experiment as r import collect_data as get import human_readable as h import speedups as spds for experiment_id in spds.ids: (maxtime, bl_avg, mlt_avg, mltlbsovhd, lbs_ovhd, norms) = r.compare_wall_clock(experiment_id, 48) problem_name = get.problem_name_of_experiment(experiment_id) problem_name = r.pretty_bench_name(problem_name) (input, ps, lbs_avg, lbs_std) = filter(lambda (input, ps, avg, err): r.is_lbs1(input), norms)[0] lbs_speedup = bl_avg / lbs_avg print(problem_name + " & " + h.speedup(mlt_avg, digits=2) + " & " + h.speedup(bl_avg, digits=2) + " & " + h.speedup(lbs_ovhd, digits=2) + " & " + h.speedup(lbs_avg, digits=2) + " & " + h.speedup(lbs_speedup, digits=2) + "\\\\")