1 import os.path, glob, sys
12 g = ROOT.TFile(
'benchmarkMEIF_'+arch+
'_'+sample+
'_'+build+
'.root',
'recreate')
17 thvals = [
'1',
'2',
'4',
'8',
'16',
'32',
'64',
'96',
'128',
'160',
'192',
'224',
'256']
18 evvals = [
'1',
'2',
'4',
'8',
'16',
'32',
'64',
'128']
21 thvals = [
'1',
'2',
'4',
'6',
'8',
'12',
'16',
'20',
'24']
22 evvals = [
'1',
'2',
'4',
'8',
'12']
23 elif arch ==
'SKL-SP' :
25 thvals = [
'1',
'2',
'4',
'8',
'16',
'32',
'48',
'64']
26 evvals = [
'1',
'2',
'4',
'8',
'16',
'32',
'64']
27 elif arch ==
'LNX-G' :
29 thvals = [
'1',
'2',
'4',
'8',
'16',
'32',
'48',
'64']
30 evvals = [
'1',
'2',
'4',
'8',
'16',
'32',
'64']
31 elif arch ==
'LNX-S' :
33 thvals = [
'1',
'2',
'4',
'8',
'16',
'32',
'48',
'64']
34 evvals = [
'1',
'2',
'4',
'8',
'16',
'32',
'64']
36 print arch,
"is not a valid architecture! Exiting..."
43 grepnEV =
'=== TOTAL for'
44 grepTime =
'Total event loop time'
47 xval0 = array.array(
'd',[0])
48 yval0 = array.array(
'd',[0])
52 print arch,sample,build,
"nEV:",evval
58 g_time = ROOT.TGraph()
59 g_speedup = ROOT.TGraph()
64 if ev > xval:
continue;
71 with open(
'log_'+arch+
'_'+sample+
'_'+build+
'_NVU'+nvu+
'_NTH'+thval+
'_NEV'+evval+
'.txt')
as f :
75 nev = float(lsplit[3])
76 elif grepTime
in line :
78 yval = float(lsplit[4])
86 g_time.SetPoint(point,xval,yval)
90 g_time.Write(
'g_'+build+
'_'+text+
'_nEV'+evval+
'_time')
94 g_time.GetPoint(0,xval0,yval0)
100 if ev > xval:
continue;
103 xval = array.array(
'd',[0])
104 yval = array.array(
'd',[0])
107 g_time.GetPoint(point,xval,yval)
111 speedup = yval0[0]/yval[0]
114 g_speedup.SetPoint(point,xval[0],speedup)
118 g_speedup.Write(
'g_'+build+
'_'+text+
'_nEV'+evval+
'_speedup')