Ignore:
Timestamp:
Aug 31, 2023, 11:31:15 PM (2 years ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
950c58e
Parents:
92355883 (diff), 686912c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Resolve conflict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/colby_parsons_MMAth/benchmarks/channels/plotData.py

    r92355883 r2a301ff  
    2020    'font.size': 16
    2121})
    22 marker = itertools.cycle(('o', 's', 'D', 'x', 'p', '^', 'h', '*', 'v' ))
     22marker = itertools.cycle(('o', 's', 'D', 'x', 'p', '^', 'h', '*', 'v' ))
     23
     24def sci_format(x, pos):
     25    return '{:.1e}'.format(x).replace('+0', '')
    2326
    2427readfile = open(sys.argv[1], "r")
     
    6265procCount = 0
    6366currVariant = 0
     67experiment_duration = 10.0
    6468name = ""
     69title = ""
    6570var_name = ""
    6671sendData = [0.0 for j in range(numVariants)]
     
    7378    if currBench == Bench.Unset:
    7479        if line == "contend:":
    75             name = "Channel Contention"
     80            name = "Channel_Contention"
     81            title = "Channel Contention"
    7682            currBench = Bench.Contend
    7783        elif line == "zero:":
     
    107113   
    108114    lineArr = line.split()
    109     tempData[count] = float(lineArr[-1])
     115    tempData[count] = float(lineArr[-1]) / experiment_duration
    110116    count += 1
    111117    if count == numTimes:
     
    125131            if currVariant == numVariants:
    126132                fig, ax = plt.subplots(layout='constrained')
    127                 plt.title(name + " Benchmark")
    128                 plt.ylabel("Throughput (channel operations)")
     133                if title != "":
     134                    plt.title(title + " Benchmark")
     135                    title = ""
     136                else:
     137                    plt.title(name + " Benchmark")
     138                plt.ylabel("Throughput (channel operations per second)")
    129139                plt.xlabel("Cores")
     140                ax.yaxis.set_major_formatter(ticks.FuncFormatter(sci_format))
    130141                for idx, arr in enumerate(data):
    131142                    plt.errorbar( procs, arr, [bars[idx][0], bars[idx][1]], capsize=2, marker=next(marker) )
    132143                marker = itertools.cycle(('o', 's', 'D', 'x', 'p', '^', 'h', '*', 'v' ))
    133                 plt.yscale("log")
     144                # plt.yscale("log")
    134145                # plt.ylim(1, None)
    135146                # ax.get_yaxis().set_major_formatter(ticks.ScalarFormatter())
Note: See TracChangeset for help on using the changeset viewer.