94 (inputfile, outputfile, graph_label) = argv[1:4]
96 re_mt = re.compile(
"nTH(?P<th>\d+)_nEV(?P<ev>\d+)")
97 re_mp = re.compile(
"nJOB(?P<job>\d+)")
104 if not "AVX512" in line:
106 comp = line.split(
" ")
107 m = re_mt.search(comp[0])
109 if m.group(
"th") != m.group(
"ev"):
110 raise Exception(
"Can't handle yet different numbers of threads (%s) and events (%s)" % (m.group(
"th"), m.group(
"ev")))
111 mt[int(m.group(
"th"))] = float(comp[1])
113 m = re_mp.search(comp[0])
115 mp[int(m.group(
"job"))] = float(comp[1])
118 ncores = sorted(list(set(mt.keys() + mp.keys())))
119 mt_y = [mt[n]
for n
in ncores]
120 mp_y = [mp[n]
for n
in ncores]
121 ideal1 = mt_y[0]/ncores[0]
122 ideal1_mp = mp_y[0]/ncores[0]
124 makePlot(outputfile+
"_throughput", ncores,
126 "Throughput (events/s)",
128 legends=[
"Multithreading",
"Multiprocessing"],
130 bounds=dict(ymin=0, xmin=0),
134 eff = [mt_y[i]/mp_y[i]
for i
in xrange(0, len(ncores))]
135 makePlot(outputfile+
"_efficiency", ncores,
137 "Multithreading efficiency (MT/MP)",
139 bounds=dict(ymin=0.9, ymax=1.1)
142 eff_vs_ideal_mt = [mt_y[i]/(ideal1*n)
for i, n
in enumerate(ncores)]
143 eff_vs_ideal_mp = [mp_y[i]/(ideal1*n)
for i, n
in enumerate(ncores)]
144 makePlot(outputfile+
"_efficiency_ideal", ncores,
145 [eff_vs_ideal_mt, eff_vs_ideal_mp],
146 "Efficiency wrt. ideal",
148 legends=[
"Multithreading",
"Multiprocessing"],
149 bounds=dict(ymin=0.8, ymax=1.01, xmax=65),
153 speedup_mt = [mt_y[i]/ideal1
for i
in xrange(0, len(ncores))]
154 speedup_mp = [mp_y[i]/ideal1
for i
in xrange(0, len(ncores))]
155 makePlot(outputfile+
"_speedup", ncores,
156 [speedup_mt, speedup_mp],
157 "Speedup wrt. 1 thread",
159 legends=[
"Multithreading",
"Multiprocessing"],
161 bounds=dict(ymin=0, xmin=0),