Exemple #1
0
def generate_threshold(jgraphs, benchmark, stat, ylabel, transformation, ymax):
    ## Generate threshold variation
    lines = []
    for module in ["MOSI_bcast_opt", "MOSI_GS"]:
        points = []
        for bandwidth in bandwidth_list:
            value = mfgraph.average(get_data(benchmark, module=module, bandwidth=bandwidth, stat=stat))
            if (value != []):
                points.append([bandwidth, value])
                
        lines.append([module] + points)

    for threshold in threshold_list:
        points = []
        for bandwidth in bandwidth_list:
            value = mfgraph.average(get_data(benchmark, module="MOSI_mcast_aggr", bandwidth=bandwidth, threshold=threshold, stat=stat))
            if (value != []):
                points.append([bandwidth, value])

        if threshold == default_threshold:
            lines.append(["MOSI_mcast_aggr"] + points)
        else:
            lines.append(["%f" % threshold] + points)

    transformation(lines)
    xlabel = "endpoint bandwidth available (MB/second)"
    jgraphs.append(mfgraph.line_graph(lines,
                                      title = "multiple thresholds: %s vs %s  - %d processors" % (xlabel, ylabel, default_processor),
                                      ymax = ymax,
                                      xlabel = xlabel,
                                      ylabel = ylabel,
                                      xlog = 10,
                                      xmin = 90.0
                                      ))
Exemple #2
0
def generate_processors(jgraphs, benchmark, stat, ylabel, transformation,
                        ymax):
    ## Generate number of processors vs performance (one graph per bandwidth)
    for bandwidth in bandwidth_list:
        lines = []
        for module in modules_list:
            points = []
            counter = 2
            for processor in processor_list:
                data = get_data(benchmark,
                                processor=processor,
                                module=module,
                                bandwidth=bandwidth,
                                stat=stat)
                if len(data) > 0:
                    value = mfgraph.average(data)
                    stddev = mfgraph.stddev(data)
                    points.append(
                        [counter, value, value - stddev, value + stddev])
                counter += 1

            lines.append([module] + points)

        transformation(lines)
        xlabel = "processor count"
        jgraphs.append(
            mfgraph.line_graph(
                lines,
                title="%s vs %s - %d bandwidth" % (xlabel, ylabel, bandwidth),
                xlabel=xlabel,
                ylabel=ylabel,
                ymax=ymax,
                xmin=1.9,
            ))
Exemple #3
0
def generate_thinktime(jgraphs, benchmark, stat, ylabel, transformation, ymax):
    for bandwidth in bandwidth_list:

        lines = []
        for module in modules_list:
            points = []
            for think_time in think_time_list:
                value = mfgraph.average(
                    get_data(benchmark,
                             module=module,
                             bandwidth=bandwidth,
                             think_time=think_time,
                             stat=stat))
                if (value != []):
                    points.append([think_time, value])
            lines.append([module] + points)

        transformation(lines)
        xlabel = "think time"
        jgraphs.append(
            mfgraph.line_graph(
                lines,
                title="%s vs %s - %d bandwidth" % (xlabel, ylabel, bandwidth),
                xlabel=xlabel,
                ylabel=ylabel,
                ymax=ymax,
            ))
Exemple #4
0
def generate_processors(jgraphs, benchmark, stat, ylabel, transformation, ymax):
    ## Generate number of processors vs performance (one graph per bandwidth)
    for bandwidth in bandwidth_list:
        lines = []
        for module in modules_list:
            points = []
            counter = 2
            for processor in processor_list:
                data = get_data(benchmark, processor=processor, module=module, bandwidth=bandwidth, stat=stat)
                if len(data) > 0:
                    value = mfgraph.average(data)
                    stddev = mfgraph.stddev(data)
                    points.append([counter, value, value - stddev, value + stddev])
                counter += 1
                    
            lines.append([module] + points)

        transformation(lines)
        xlabel = "processor count"
        jgraphs.append(mfgraph.line_graph(lines,
                                          title = "%s vs %s - %d bandwidth" % (xlabel, ylabel, bandwidth),
                                          xlabel = xlabel,
                                          ylabel = ylabel,
                                          ymax = ymax,
                                          xmin = 1.9,
                                          ))
Exemple #5
0
def generate_bandwidth(jgraphs, benchmark, stat, ylabel, transformation, ymax):
    ## Generate bandwidth available vs performance (one graph per processor count)
    for processor in processor_list:
        lines = []
        for module in modules_list:
            points = []
            for bandwidth in bandwidth_list:
                data = get_data(benchmark,
                                processor=processor,
                                module=module,
                                bandwidth=bandwidth,
                                stat=stat)
                if len(data) > 0:
                    value = mfgraph.average(data)
                    stddev = mfgraph.stddev(data)
                    points.append(
                        [bandwidth, value, value + stddev, value - stddev])
            lines.append([module] + points)

        transformation(lines)
        xlabel = "endpoint bandwidth available (MB/second)"
        jgraphs.append(
            mfgraph.line_graph(lines,
                               title="%s: %d processors" %
                               (benchmark, processor),
                               ymax=ymax,
                               xlabel=xlabel,
                               ylabel=ylabel,
                               xlog=10,
                               xmin=90.0))
Exemple #6
0
def generate_threshold(jgraphs, benchmark, stat, ylabel, transformation, ymax):
    ## Generate threshold variation
    lines = []
    for module in ["MOSI_bcast_opt", "MOSI_GS"]:
        points = []
        for bandwidth in bandwidth_list:
            value = mfgraph.average(
                get_data(benchmark,
                         module=module,
                         bandwidth=bandwidth,
                         stat=stat))
            if (value != []):
                points.append([bandwidth, value])

        lines.append([module] + points)

    for threshold in threshold_list:
        points = []
        for bandwidth in bandwidth_list:
            value = mfgraph.average(
                get_data(benchmark,
                         module="MOSI_mcast_aggr",
                         bandwidth=bandwidth,
                         threshold=threshold,
                         stat=stat))
            if (value != []):
                points.append([bandwidth, value])

        if threshold == default_threshold:
            lines.append(["MOSI_mcast_aggr"] + points)
        else:
            lines.append(["%f" % threshold] + points)

    transformation(lines)
    xlabel = "endpoint bandwidth available (MB/second)"
    jgraphs.append(
        mfgraph.line_graph(
            lines,
            title="multiple thresholds: %s vs %s  - %d processors" %
            (xlabel, ylabel, default_processor),
            ymax=ymax,
            xlabel=xlabel,
            ylabel=ylabel,
            xlog=10,
            xmin=90.0))
Exemple #7
0
def generate_micro4(stat, ylabel, transformation, ymax, legend_x, legend_y):
    benchmark = "microbenchmark"
    processor = 64
    ## Generate bandwidth available vs performance (one graph per processor count)
    for bandwidth in bandwidth_list:
        jgraph_input = ""
        lines = []
        for module in modules_list:
            points = []
            for think_time in think_time_list:
                if think_time > 1000:
                    continue
                data = get_data(benchmark,
                                think_time=think_time,
                                processor=processor,
                                module=module,
                                bandwidth=bandwidth,
                                stat=stat)
                if len(data) > 0:
                    value = mfgraph.average(data)
                    if (stat == "Ruby_cycles"):
                        points.append([
                            think_time, ((value / 10000.0) - think_time) / 2.0
                        ])
                    else:
                        points.append([think_time, value])

            lines.append([protocol_name[module]] + points)

        transformation(lines)
        xlabel = "think time (cycles)"
        jgraph_input += mfgraph.line_graph(
            lines,
            title_fontsize="12",
            title_font="Times-Roman",
            ymax=ymax,
            xlabel=xlabel,
            ylabel=ylabel,
            label_fontsize="9",
            xsize=1.8,
            ysize=1.8,
            xmin=0.0,
            legend_x=legend_x,
            legend_y=legend_y,
            legend_fontsize="8",
            #                                           marktype = ["circle"],
            #                                           marksize = .03,
        )

        if stat == "links_utilized_percent":
            jgraph_input += "newcurve clip pts 0.1 75 1000 75 linetype solid linethickness 1 marktype none gray .75\n"
            jgraph_input += "newstring x 950 y 76 fontsize 8 : 75%\n"

        mfgraph.run_jgraph(
            jgraph_input, "bash-microbenchmark-thinktime-%d-%s" %
            (bandwidth, string.split(ylabel)[0]))
Exemple #8
0
def generate_macro_bar():
    processor = 16
    bandwidth = 1600
    stat = "Ruby_cycles"

    stacks = []
    for benchmark in benchmarks[1:]:
        bars = []
        modules = ["MOSI_bcast_opt_4", "MOSI_GS_4", "MOSI_mcast_aggr_4"]
        #norm = mfgraph.average(get_data(benchmark, processor=processor, module="MOSI_mcast_aggr_4", bandwidth=bandwidth, stat=stat))
        norm = mfgraph.average(get_data(benchmark, processor=processor, module="MOSI_bcast_opt_4", bandwidth=bandwidth, stat=stat))
        for module in modules:

            if module == "MOSI_mcast_aggr_4":
                bars.append(["", 0])
            else:
                data = get_data(benchmark, processor=processor, module=module, bandwidth=bandwidth, stat=stat)
                value = mfgraph.average(data)
                stddev = mfgraph.stddev(data)
                if (stddev/value)*100.0 > 1.0: # only plot error bars if they are more than 1%
                    bars.append([protocol_name[module], [norm/value, norm/(value+stddev), norm/(value-stddev)]])
                else:
                    bars.append([protocol_name[module], [norm/value, norm/(value+stddev), norm/(value-stddev)]])
    #                bars.append([protocol_name[module], norm/value])
        stacks.append([workload_name[benchmark]] + bars)
    jgraph_input = mfgraph.stacked_bar_graph(stacks,
                                             colors = ["1 0 0", "0 .5 0", "0 0 1", "0 1 1", "1 0 1"],
#                                             colors = [".85 .85 .85", ".5 .5 .5", ".45 .45 .45"],
                                             patterns = ["solid", "stripe -45"],
                                             ymax = 1.5,
                                             xsize = 2.7,
                                             ysize = 2.3,
                                             label_fontsize = "9",
                                             hash_label_fontsize = "9",
                                             stack_name_font_size = "9",
                                             bar_name_font_size = "9",
                                             bar_name_rotate = 90.0,
                                             stack_name_location = 28.0,
                                             ylabel = "normalized performance",
                                             yhash = 0.2,
                                             ymhash = 1,
                                             )
    mfgraph.run_jgraph(jgraph_input, "bash-macro-talk-bars")
Exemple #9
0
def generate_micro3(stat, ylabel, transformation, ymax, legend_x, legend_y):
    benchmark = "microbenchmark"
    ## Generate bandwidth available vs performance (one graph per processor count)
    for bandwidth in bandwidth_list:
        jgraph_input = ""
        lines = []
        for module in modules_list:
            points = []
            for processor in processor_list:
                data = get_data(benchmark,
                                processor=processor,
                                module=module,
                                bandwidth=bandwidth,
                                stat=stat)
                if len(data) > 0:
                    value = mfgraph.average(data)
                    points.append([processor, value])

            lines.append([protocol_name[module]] + points)

        transformation(lines)
        xlabel = "processors"
        if ylabel == "performance":
            ylabel = "performance per processor"
        jgraph_input += mfgraph.line_graph(
            lines,
            title_fontsize="12",
            title_font="Times-Roman",
            ymax=ymax,
            xlabel=xlabel,
            ylabel=ylabel,
            label_fontsize="9",
            xsize=1.8,
            ysize=1.8,
            xlog=10,
            xmin=3.0,
            legend_x=4,
            legend_y=legend_y,
            legend_fontsize="8",
            marktype=["circle"],
            marksize=.03,
            hash_marks=map(str, processor_list),
        )

        if stat == "links_utilized_percent":
            jgraph_input += "newcurve clip pts 0.1 75 512 75 linetype solid linethickness 1 marktype none gray .75\n"
            jgraph_input += "newstring x 512 y 76 fontsize 8 : 75%\n"

        mfgraph.run_jgraph(
            jgraph_input, "bash-microbenchmark-processors-%d-%s" %
            (bandwidth, string.split(ylabel)[0]))
Exemple #10
0
def generate_micro1(stat, ylabel, transformation, ymax, legend_x, legend_y):
    jgraph_input = ""
    ## Generate bandwidth available vs performance (one graph per processor count)
    benchmark = "microbenchmark"
    processor = 64
    lines = []
    for module in modules_list:
        points = []
        for bandwidth in bandwidth_list:
            if bandwidth > 30000:
                continue
            data = get_data(benchmark,
                            processor=processor,
                            module=module,
                            bandwidth=bandwidth,
                            stat=stat)
            if len(data) > 0:
                value = mfgraph.average(data)
                points.append([bandwidth, value])
        lines.append([protocol_name[module]] + points)

    transformation(lines)
    xlabel = "endpoint bandwidth available (MB/second)"
    jgraph_input += mfgraph.line_graph(
        lines,
        ymax=ymax,
        xlabel=xlabel,
        ylabel=ylabel,
        label_fontsize="9",
        xsize=1.8,
        ysize=1.8,
        xlog=10,
        xmin=90.0,
        xmax=30000.0,
        legend_x=legend_x,
        legend_y=legend_y,
        legend_fontsize="8",
        ylabel_location=18.0,
    )

    if stat == "links_utilized_percent":
        jgraph_input += "newcurve clip pts 0.1 75 200000 75 linetype solid linethickness 1 marktype none gray .75\n"
        jgraph_input += "newstring x 20000 y 76 fontsize 8 : 75%\n"

    mfgraph.run_jgraph(
        jgraph_input,
        "bash-microbench-basic-%d-%s" % (processor, string.split(ylabel)[0]))
Exemple #11
0
def generate_micro4(stat, ylabel, transformation, ymax, legend_x, legend_y):
    benchmark = "microbenchmark"
    processor = 64
    ## Generate bandwidth available vs performance (one graph per processor count)
    for bandwidth in bandwidth_list:
        jgraph_input = ""
        lines = []
        for module in modules_list:
            points = []
            for think_time in think_time_list:
                if think_time > 1000:
                    continue
                data = get_data(benchmark, think_time=think_time, processor=processor, module=module, bandwidth=bandwidth, stat=stat)
                if len(data) > 0:
                    value = mfgraph.average(data)
                    if (stat == "Ruby_cycles"):
                        points.append([think_time, ((value/10000.0)-think_time)/2.0])
                    else:
                        points.append([think_time, value])
                        
            lines.append([protocol_name[module]] + points)
            
        transformation(lines)
        xlabel = "think time (cycles)"
        jgraph_input += mfgraph.line_graph(lines,
                                           title_fontsize = "12",
                                           title_font = "Times-Roman",
                                           ymax = ymax,
                                           xlabel = xlabel,
                                           ylabel = ylabel,
                                           label_fontsize = "9",
                                           xsize = 1.8,
                                           ysize = 1.8,
                                           xmin = 0.0,
                                           legend_x = legend_x,
                                           legend_y = legend_y,
                                           legend_fontsize = "8",
#                                           marktype = ["circle"],
#                                           marksize = .03,
                                           )
        
        if stat == "links_utilized_percent":
            jgraph_input += "newcurve clip pts 0.1 75 1000 75 linetype solid linethickness 1 marktype none gray .75\n"
            jgraph_input += "newstring x 950 y 76 fontsize 8 : 75%\n"
        
        mfgraph.run_jgraph(jgraph_input, "bash-microbenchmark-thinktime-%d-%s" % (bandwidth, string.split(ylabel)[0]))
Exemple #12
0
def generate_micro3(stat, ylabel, transformation, ymax, legend_x, legend_y):
    benchmark = "microbenchmark"
    ## Generate bandwidth available vs performance (one graph per processor count)
    for bandwidth in bandwidth_list:
        jgraph_input = ""
        lines = []
        for module in modules_list:
            points = []
            for processor in processor_list:
                data = get_data(benchmark, processor=processor, module=module, bandwidth=bandwidth, stat=stat)
                if len(data) > 0:
                    value = mfgraph.average(data)
                    points.append([processor, value])
                        
            lines.append([protocol_name[module]] + points)
            
        transformation(lines)
        xlabel = "processors"
        if ylabel == "performance":
            ylabel = "performance per processor"
        jgraph_input += mfgraph.line_graph(lines,
                                           title_fontsize = "12",
                                           title_font = "Times-Roman",
                                           ymax = ymax,
                                           xlabel = xlabel,
                                           ylabel = ylabel,
                                           label_fontsize = "9",
                                           xsize = 1.8,
                                           ysize = 1.8,
                                           xlog = 10,
                                           xmin = 3.0,
                                           legend_x = 4,
                                           legend_y = legend_y,
                                           legend_fontsize = "8",
                                           marktype = ["circle"],
                                           marksize = .03,
                                           hash_marks = map(str, processor_list),
                                           )
        
        if stat == "links_utilized_percent":
            jgraph_input += "newcurve clip pts 0.1 75 512 75 linetype solid linethickness 1 marktype none gray .75\n"
            jgraph_input += "newstring x 512 y 76 fontsize 8 : 75%\n"
        
        mfgraph.run_jgraph(jgraph_input, "bash-microbenchmark-processors-%d-%s" % (bandwidth, string.split(ylabel)[0]))
Exemple #13
0
def generate_thinktime(jgraphs, benchmark, stat, ylabel, transformation, ymax):
    for bandwidth in bandwidth_list:

        lines = []
        for module in modules_list:
            points = []
            for think_time in think_time_list:
                value = mfgraph.average(get_data(benchmark, module=module, bandwidth=bandwidth, think_time=think_time, stat=stat))
                if (value != []):
                    points.append([think_time, value])
            lines.append([module] + points)

        transformation(lines)
        xlabel = "think time"
        jgraphs.append(mfgraph.line_graph(lines,
                                          title = "%s vs %s - %d bandwidth" % (xlabel, ylabel, bandwidth),
                                          xlabel = xlabel,
                                          ylabel = ylabel,
                                          ymax = ymax,
                                          ))
Exemple #14
0
def generate_micro1(stat, ylabel, transformation, ymax, legend_x, legend_y):
    jgraph_input = ""
    ## Generate bandwidth available vs performance (one graph per processor count)
    benchmark = "microbenchmark"
    processor = 64
    lines = []
    for module in modules_list:
        points = []
        for bandwidth in bandwidth_list:
            if bandwidth > 30000:
                continue
            data = get_data(benchmark, processor=processor, module=module, bandwidth=bandwidth, stat=stat)
            if len(data) > 0:
                value = mfgraph.average(data)
                points.append([bandwidth, value])
        lines.append([protocol_name[module]] + points)

    transformation(lines)
    xlabel = "endpoint bandwidth available (MB/second)"
    jgraph_input += mfgraph.line_graph(lines,
                                       ymax = ymax,
                                       xlabel = xlabel,
                                       ylabel = ylabel,
                                       label_fontsize = "9",
                                       xsize = 1.8,
                                       ysize = 1.8,
                                       xlog = 10,
                                       xmin = 90.0,
                                       xmax = 30000.0,
                                       legend_x = legend_x,
                                       legend_y = legend_y,
                                       legend_fontsize = "8",
                                       ylabel_location = 18.0,
                                      )
        
    if stat == "links_utilized_percent":
        jgraph_input += "newcurve clip pts 0.1 75 200000 75 linetype solid linethickness 1 marktype none gray .75\n"
        jgraph_input += "newstring x 20000 y 76 fontsize 8 : 75%\n"
    
    mfgraph.run_jgraph(jgraph_input, "bash-microbench-basic-%d-%s" % (processor, string.split(ylabel)[0]))
Exemple #15
0
def make_bars(fields, data):
    if (len(fields) <= 0):
        return

    map = {}
    for field in fields:
        map[field] = {}

    for tuple in data:
        fCnt = 1
        for field in fields:
            #print field
            key = tuple[0]
            #print "key: %d" % key
            if map[field].has_key(key):
                dummy = 0
            else:
                map[field][key] = []

            map[field][key].append(tuple[fCnt])
            fCnt += 1

    fField = fields[0]

    tuple_list = []
    for key in map[fField].keys():
        tuple = [key]
        for field in fields:
            avg_val = mfgraph.average(map[field][key])
            if avg_val < 0:
                print "Error: entering negative avg val for %s at %dp" % (
                    field, key)
            tuple.append(avg_val)
        #print tuple
        #stacked_tuple = [key] + mfgraph.stack_bars(tuple)
        tuple_list.append(tuple)

    return tuple_list
Exemple #16
0
def generate_bandwidth(jgraphs, benchmark, stat, ylabel, transformation, ymax):
    ## Generate bandwidth available vs performance (one graph per processor count)
    for processor in processor_list:
        lines = []
        for module in modules_list:
            points = []
            for bandwidth in bandwidth_list:
                data = get_data(benchmark, processor=processor, module=module, bandwidth=bandwidth, stat=stat)
                if len(data) > 0:
                    value = mfgraph.average(data)
                    stddev = mfgraph.stddev(data)
                    points.append([bandwidth, value, value+stddev, value-stddev])
            lines.append([module] + points)

        transformation(lines)
        xlabel = "endpoint bandwidth available (MB/second)"
        jgraphs.append(mfgraph.line_graph(lines,
                                          title = "%s: %d processors" % (benchmark, processor),
                                          ymax = ymax,
                                          xlabel = xlabel,
                                          ylabel = ylabel,
                                          xlog = 10,
                                          xmin = 90.0
                                          ))
Exemple #17
0
def make_bars(fields, data):
    if(len(fields) <= 0):
        return

    map = {}
    for field in fields:
        map[field] = {}

    for tuple in data:
        fCnt = 1
        for field in fields:
            #print field
            key = tuple[0]
            #print "key: %d" % key
            if map[field].has_key(key):
                dummy = 0
            else:
                map[field][key] = []

            map[field][key].append(tuple[fCnt])
            fCnt += 1

    fField = fields[0]

    tuple_list = []
    for key in map[fField].keys():
        tuple = [key]
        for field in fields:
            avg_val = mfgraph.average(map[field][key])
            if avg_val < 0: print "Error: entering negative avg val for %s at %dp" % (field, key)
            tuple.append(avg_val)
        #print tuple
        #stacked_tuple = [key] + mfgraph.stack_bars(tuple)
        tuple_list.append(tuple)

    return tuple_list
Exemple #18
0
def generate_micro1(stat, ylabel, transformation, ymax, legend_x, legend_y):
    jgraph_input = ""
    ## Generate bandwidth available vs performance (one graph per processor count)
    benchmark = "microbenchmark"
    processor = 64
    lines = []
    for module in ["MOSI_bcast_opt_1", "MOSI_GS_1"]:
        points = []
        for bandwidth in bandwidth_list:
            if bandwidth > 30000:
                continue
            data = get_data(benchmark, processor=processor, module=module, bandwidth=bandwidth, stat=stat)
            if len(data) > 0:
                value = mfgraph.average(data)
                points.append([bandwidth, value])
        lines.append([protocol_name[module]] + points)

    transformation(lines)
    xlabel = "endpoint bandwidth available (MB/second)"
    jgraph_input += mfgraph.line_graph(lines,
                                       ymax = ymax,
                                       xlabel = xlabel,
                                       ylabel = ylabel,
                                       label_fontsize = "9",
                                       xsize = 1.8,
                                       ysize = 1.8,
                                       xlog = 10,
                                       xmin = 90.0,
                                       xmax = 30000.0,
                                       legend_x = legend_x,
                                       legend_y = legend_y,
                                       legend_fontsize = "8",
                                       ylabel_location = 18.0,
                                       colors = ["1 0 0", "0 .5 0", "0 1 1", "1 0 1"],
                                       linetype = ["dotted", "longdash", "dotdash", "dashed"],
                                      )
        
    if stat == "links_utilized_percent":
        jgraph_input += "newcurve clip pts 0.1 75 200000 75 linetype solid linethickness 1 marktype none gray .75\n"
        jgraph_input += "newstring x 20000 y 76 fontsize 8 : 75%\n"
    
    mfgraph.run_jgraph(jgraph_input, "bash-microbench-talk-two-%d-%s" % (processor, string.split(ylabel)[0]))

############ repeated code

    jgraph_input = ""
    ## Generate bandwidth available vs performance (one graph per processor count)
    benchmark = "microbenchmark"
    processor = 64
    lines = []
    for module in modules_list:
        points = []
        for bandwidth in bandwidth_list:
            if bandwidth > 30000:
                continue
            data = get_data(benchmark, processor=processor, module=module, bandwidth=bandwidth, stat=stat)
            if len(data) > 0:
                value = mfgraph.average(data)
                points.append([bandwidth, value])
        lines.append([protocol_name[module]] + points)

    transformation(lines)
    xlabel = "endpoint bandwidth available (MB/second)"
    jgraph_input += mfgraph.line_graph(lines,
                                       ymax = ymax,
                                       xlabel = xlabel,
                                       ylabel = ylabel,
                                       label_fontsize = "9",
                                       xsize = 1.8,
                                       ysize = 1.8,
                                       xlog = 10,
                                       xmin = 90.0,
                                       xmax = 30000.0,
                                       legend_x = legend_x,
                                       legend_y = legend_y,
                                       legend_fontsize = "8",
                                       ylabel_location = 18.0,
                                      )
        
    if stat == "links_utilized_percent":
        jgraph_input += "newcurve clip pts 0.1 75 200000 75 linetype solid linethickness 1 marktype none gray .75\n"
        jgraph_input += "newstring x 20000 y 76 fontsize 8 : 75%\n"
    
    mfgraph.run_jgraph(jgraph_input, "bash-microbench-talk-three-%d-%s" % (processor, string.split(ylabel)[0]))

############ repeated code

    jgraph_input = ""
    ## Generate bandwidth available vs performance (one graph per processor count)
    benchmark = "microbenchmark"
    processor = 64
    lines = []
    for module in ["MOSI_bcast_opt_1", "maximum", "MOSI_GS_1"]:
        points = []
        for bandwidth in bandwidth_list:
            if bandwidth > 30000:
                continue

            if module == "maximum":
                data1 = get_data(benchmark, processor=processor, module="MOSI_bcast_opt_1", bandwidth=bandwidth, stat=stat)
                data2 = get_data(benchmark, processor=processor, module="MOSI_GS_1", bandwidth=bandwidth, stat=stat)

                if len(data1) > 0:
                    value1 = mfgraph.average(data1)
                
                if len(data2) > 0:
                    value2 = mfgraph.average(data2)

                value = min([value1, value2])
                points.append([bandwidth, value])
            else:
                data = get_data(benchmark, processor=processor, module=module, bandwidth=bandwidth, stat=stat)
                
                if len(data) > 0:
                    value = mfgraph.average(data)
                    points.append([bandwidth, value])

        lines.append([protocol_name[module]] + points)

    transformation(lines)
    xlabel = "endpoint bandwidth available (MB/second)"
    jgraph_input += mfgraph.line_graph(lines,
                                       ymax = ymax,
                                       xlabel = xlabel,
                                       ylabel = ylabel,
                                       label_fontsize = "9",
                                       xsize = 1.8,
                                       ysize = 1.8,
                                       xlog = 10,
                                       xmin = 90.0,
                                       xmax = 30000.0,
                                       legend_x = legend_x,
                                       legend_y = legend_y,
                                       legend_fontsize = "8",
                                       ylabel_location = 18.0,
                                      )
        
    if stat == "links_utilized_percent":
        jgraph_input += "newcurve clip pts 0.1 75 200000 75 linetype solid linethickness 1 marktype none gray .75\n"
        jgraph_input += "newstring x 20000 y 76 fontsize 8 : 75%\n"
    
    mfgraph.run_jgraph(jgraph_input, "bash-microbench-talk-three-max-%d-%s" % (processor, string.split(ylabel)[0]))
Exemple #19
0
def generate_micro2(stat, ylabel, transformation, ymax, legend_x, legend_y):

    jgraph_input = ""
    ## Generate threshold variation
    benchmark = "microbenchmark"
    processor = 64

    lines = []
    for module in ["MOSI_bcast_opt_1"]:
        points = []
        for bandwidth in bandwidth_list:
            if bandwidth > 30000:
                continue
            value = mfgraph.average(
                get_data(benchmark,
                         module=module,
                         bandwidth=bandwidth,
                         stat=stat))
            if (value != 0):
                points.append([bandwidth, value])

        lines.append([protocol_name[module]] + points)

    for threshold in [0.55, 0.75, 0.95]:
        points = []
        for bandwidth in bandwidth_list:
            if bandwidth > 30000:
                continue
            value = mfgraph.average(
                get_data(benchmark,
                         module="MOSI_mcast_aggr_1",
                         bandwidth=bandwidth,
                         threshold=threshold,
                         stat=stat))
            if (value != 0):
                points.append([bandwidth, value])

        lines.append([
            protocol_name["MOSI_mcast_aggr_1"] + ": %2.0f%%" %
            (threshold * 100)
        ] + points)

    for module in ["MOSI_GS_1"]:
        points = []
        for bandwidth in bandwidth_list:
            if bandwidth > 30000:
                continue
            value = mfgraph.average(
                get_data(benchmark,
                         module=module,
                         bandwidth=bandwidth,
                         stat=stat))
            if (value != 0):
                points.append([bandwidth, value])

        lines.append([protocol_name[module]] + points)

    global norm_module
    old_norm_module = norm_module
    norm_module = protocol_name["MOSI_mcast_aggr_1"] + ": %2.0f%%" % (
        default_threshold * 100)
    transformation(lines)
    norm_module = old_norm_module

    xlabel = "endpoint bandwidth available (MB/second)"
    jgraph_input += mfgraph.line_graph(
        lines,
        title_fontsize="12",
        title_font="Times-Roman",
        ymax=ymax,
        xlabel=xlabel,
        ylabel=ylabel,
        label_fontsize="9",
        xsize=1.8,
        ysize=1.8,
        xlog=10,
        xmin=90.0,
        xmax=30000.0,
        legend_x=legend_x,
        legend_y=legend_y,
        legend_fontsize="8",
        ylabel_location=18.0,
    )

    mfgraph.run_jgraph(
        jgraph_input, "bash-microbench-threshold-%d-%s" %
        (processor, string.split(ylabel)[0]))
Exemple #20
0
def generate_macro(scale, benchmarks, stat, ylabel, transformation, ymax):
    cols = 3
    row_space = 2.2
    col_space = 2.3
    jgraph_input = ""
    num = 0
    ## Generate bandwidth available vs performance (one graph per processor count)
    for benchmark in benchmarks:
        processor = 16
        lines = []
        if scale == 4:
            modules = "MOSI_bcast_opt_4", "MOSI_mcast_aggr_4", "MOSI_GS_4", 

        if scale == 1:
            modules = "MOSI_bcast_opt_1", "MOSI_mcast_aggr_1", "MOSI_GS_1", 

        for module in modules:
            points = []
            for bandwidth in bandwidth_list:
                if bandwidth < 600:
                    continue
                if bandwidth > 12800:
                    continue
                data = get_data(benchmark, processor=processor, module=module, bandwidth=bandwidth, stat=stat)
                if len(data) > 0:
                    value = mfgraph.average(data)
                    stddev = mfgraph.stddev(data)
                    if (stddev/value)*100.0 > 1.0 and benchmark != "microbenchmark": # only plot error bars if they are more than 1%
                        points.append([bandwidth, value, value+stddev, value-stddev])
                    else:
                        points.append([bandwidth, value])
                        
            lines.append([protocol_name[module]] + points)
            
        transformation(lines)

        # don't plot marks for the microbenchmark
        benchmark_marktype = ["circle"]
        if benchmark == "microbenchmark":
            benchmark_marktype = ["none"]
            
        xlabel = "endpoint bandwidth available (MB/second)"
        jgraph_input += mfgraph.line_graph(lines,
                                           #title = "%s: %dx%d processors" % (workload_name[benchmark], scale, processor),
                                           title = "%s" % (workload_name[benchmark]),
                                           title_fontsize = "10",
                                           title_font = "Times-Roman",
                                           ymax = ymax,
                                           xlabel = xlabel,
                                           ylabel = ylabel,
                                           label_fontsize = "9",
                                           xsize = 1.8,
                                           ysize = 1.4,
                                           xlog = 10,
                                           xmin = 450.0,
                                           xmax = 12800.0,
                                           legend_x = "2500",
                                           legend_y = ".18",
                                           legend_fontsize = "8",
                                           marktype = benchmark_marktype,
                                           marksize = .03,
                                           x_translate = (num % cols) * col_space,
                                           y_translate = (num / cols) * -row_space,
                                           ylabel_location = 18.0,
                                           )
        
        if stat == "links_utilized_percent":
            jgraph_input += "newcurve clip pts 0.1 75 11000 75 linetype solid linethickness 1 marktype none gray .75\n"
            jgraph_input += "newstring x 10000 y 76 fontsize 8 : 75%\n"
        
        num += 1
        
    mfgraph.run_jgraph(jgraph_input, "bash-macrobenchmarks-%d-%s" % (scale, string.split(ylabel)[0]))
Exemple #21
0
def generate_macro(scale, benchmarks, stat, ylabel, transformation, ymax):
    cols = 3
    row_space = 2.2
    col_space = 2.3
    jgraph_input = ""
    num = 0
    ## Generate bandwidth available vs performance (one graph per processor count)
    for benchmark in benchmarks:
        processor = 16
        lines = []
        if scale == 4:
            modules = "MOSI_bcast_opt_4", "MOSI_mcast_aggr_4", "MOSI_GS_4",

        if scale == 1:
            modules = "MOSI_bcast_opt_1", "MOSI_mcast_aggr_1", "MOSI_GS_1",

        for module in modules:
            points = []
            for bandwidth in bandwidth_list:
                if bandwidth < 600:
                    continue
                if bandwidth > 12800:
                    continue
                data = get_data(benchmark,
                                processor=processor,
                                module=module,
                                bandwidth=bandwidth,
                                stat=stat)
                if len(data) > 0:
                    value = mfgraph.average(data)
                    stddev = mfgraph.stddev(data)
                    if (
                            stddev / value
                    ) * 100.0 > 1.0 and benchmark != "microbenchmark":  # only plot error bars if they are more than 1%
                        points.append(
                            [bandwidth, value, value + stddev, value - stddev])
                    else:
                        points.append([bandwidth, value])

            lines.append([protocol_name[module]] + points)

        transformation(lines)

        # don't plot marks for the microbenchmark
        benchmark_marktype = ["circle"]
        if benchmark == "microbenchmark":
            benchmark_marktype = ["none"]

        xlabel = "endpoint bandwidth available (MB/second)"
        jgraph_input += mfgraph.line_graph(
            lines,
            #title = "%s: %dx%d processors" % (workload_name[benchmark], scale, processor),
            title="%s" % (workload_name[benchmark]),
            title_fontsize="10",
            title_font="Times-Roman",
            ymax=ymax,
            xlabel=xlabel,
            ylabel=ylabel,
            label_fontsize="9",
            xsize=1.8,
            ysize=1.4,
            xlog=10,
            xmin=450.0,
            xmax=12800.0,
            legend_x="2500",
            legend_y=".18",
            legend_fontsize="8",
            marktype=benchmark_marktype,
            marksize=.03,
            x_translate=(num % cols) * col_space,
            y_translate=(num / cols) * -row_space,
            ylabel_location=18.0,
        )

        if stat == "links_utilized_percent":
            jgraph_input += "newcurve clip pts 0.1 75 11000 75 linetype solid linethickness 1 marktype none gray .75\n"
            jgraph_input += "newstring x 10000 y 76 fontsize 8 : 75%\n"

        num += 1

    mfgraph.run_jgraph(
        jgraph_input,
        "bash-macrobenchmarks-%d-%s" % (scale, string.split(ylabel)[0]))
Exemple #22
0
def generate_micro2(stat, ylabel, transformation, ymax, legend_x, legend_y):

    jgraph_input = ""
    ## Generate threshold variation
    benchmark = "microbenchmark"
    processor = 64

    lines = []
    for module in ["MOSI_bcast_opt_1"]:
        points = []
        for bandwidth in bandwidth_list:
            if bandwidth > 30000:
                continue
            value = mfgraph.average(get_data(benchmark, module=module, bandwidth=bandwidth, stat=stat))
            if (value != 0):
                points.append([bandwidth, value])
                
        lines.append([protocol_name[module]] + points)

    for threshold in [0.55, 0.75, 0.95]:
        points = []
        for bandwidth in bandwidth_list:
            if bandwidth > 30000:
                continue
            value = mfgraph.average(get_data(benchmark, module="MOSI_mcast_aggr_1", bandwidth=bandwidth, threshold=threshold, stat=stat))
            if (value != 0):
                points.append([bandwidth, value])

        lines.append([protocol_name["MOSI_mcast_aggr_1"] + ": %2.0f%%" % (threshold*100)] + points)

    for module in ["MOSI_GS_1"]:
        points = []
        for bandwidth in bandwidth_list:
            if bandwidth > 30000:
                continue
            value = mfgraph.average(get_data(benchmark, module=module, bandwidth=bandwidth, stat=stat))
            if (value != 0):
                points.append([bandwidth, value])
                
        lines.append([protocol_name[module]] + points)

    global norm_module
    old_norm_module = norm_module
    norm_module = protocol_name["MOSI_mcast_aggr_1"] + ": %2.0f%%" % (default_threshold*100)
    transformation(lines)
    norm_module = old_norm_module

    xlabel = "endpoint bandwidth available (MB/second)"
    jgraph_input += mfgraph.line_graph(lines,
                                       title_fontsize = "12",
                                       title_font = "Times-Roman",
                                       ymax = ymax,
                                       xlabel = xlabel,
                                       ylabel = ylabel,
                                       label_fontsize = "9",
                                       xsize = 1.8,
                                       ysize = 1.8,
                                       xlog = 10,
                                       xmin = 90.0,
                                       xmax = 30000.0,
                                       legend_x = legend_x,
                                       legend_y = legend_y,
                                       legend_fontsize = "8",
                                       ylabel_location = 18.0,
                                       )

    mfgraph.run_jgraph(jgraph_input, "bash-microbench-threshold-%d-%s" % (processor, string.split(ylabel)[0]))