Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v28r2p1 (f1a77ff4)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
plotSpeedupsPyRoot Namespace Reference

Functions

def scaleCores (n_threads)
 
def getText (x, y, text, scale, angle, colour, font)
 
def formatGraphs (graph, graphc)
 
def createFname (neif, nt, cFlag)
 
def xtractTiming (neif, nt, cFlag)
 

Variables

string fname_template = "measurement_BrunelScenario_n100_eif%s_aif100_nthreads%s_c%s_dqFalse_v5.log"
 
list neif_l = [1,2,3,5,20,30]
 
list nts = [2,3,5,10,11,12,13,15,23]
 
list cFlags = ["True","False"]
 
float ScalarTime = 1640.87
 
string LegendDrawOpts = "lp"
 
list LineColours
 
list MarkerStyles
 
int MarkerSize = 4
 
int LineWidth = 6
 
int LineStyle = 7
 
int graph_counter = 0
 
int PhCores = 11
 
int TotalCores = 24
 
float HtCoreWeight = 0.4
 
int LabelsFont = 12
 
int LabelsSize = .6
 
bool scaleThreads = False
 
int len_nt = len(nts)+1
 
 idealSpeedup = TGraph(2)
 
string scaled_s = ""
 
list neif_graphs = []
 
 graph = TGraph(len_nt)
 
 graphc = TGraph(len_nt)
 
int counter = 1
 
 scaled_tn = tn
 
 time = xtractTiming(neif,tn,False)
 
 timec = xtractTiming(neif,tn,True)
 
 canvas = TCanvas("Speedup","Speedup",2048,1800)
 
 line = TLine(11,0,11,25)
 
 legend = TLegend(.1,.45,.38,.9)
 
 ph_cores = getText(10.5,15,"Physical Cores",LabelsSize,90,2,LabelsFont)
 
 ht_cores = getText(12.,15,"Hardware Threaded Regime",LabelsSize,90,2,LabelsFont)
 
 is_text = getText(16,16.5,"Ideal (linear) Speedup", LabelsSize, 45, 918, LabelsFont)
 
int ht_weight = 0
 

Function Documentation

def plotSpeedupsPyRoot.createFname (   neif,
  nt,
  cFlag 
)

Definition at line 84 of file plotSpeedupsPyRoot.py.

84 def createFname(neif,nt,cFlag):
85  return fname_template %(neif,nt,cFlag)
86 
87 #--------------------
88 
def createFname(neif, nt, cFlag)
def plotSpeedupsPyRoot.formatGraphs (   graph,
  graphc 
)

Definition at line 70 of file plotSpeedupsPyRoot.py.

70 def formatGraphs(graph,graphc):
71  global graph_counter
72  graphc.SetLineStyle(LineStyle)
73  graphs=(graph,graphc)
74  for g in graphs:
75  g.SetLineWidth(LineWidth)
76  g.SetMarkerSize(MarkerSize)
77  g.SetMarkerStyle(MarkerStyles[graph_counter])
78  g.SetLineColor(LineColours[graph_counter])
79  g.SetMarkerColor(LineColours[graph_counter])
80  graph_counter+=1
81 
82 #--------------------
83 
def formatGraphs(graph, graphc)
def plotSpeedupsPyRoot.getText (   x,
  y,
  text,
  scale,
  angle,
  colour,
  font 
)

Definition at line 62 of file plotSpeedupsPyRoot.py.

62 def getText(x,y,text,scale,angle,colour,font):
63  lat = TLatex(x,y,"#scale[%s]{#color[%s]{#font[%s]{%s}}}"%(scale,colour,font,text))
64  if angle!=0.:
65  lat.SetTextAngle(angle)
66  return lat
67 
68 #--------------------
69 
def getText(x, y, text, scale, angle, colour, font)
def plotSpeedupsPyRoot.scaleCores (   n_threads)

Definition at line 53 of file plotSpeedupsPyRoot.py.

53 def scaleCores(n_threads):
54  effective_n_threads=n_threads
55  if effective_n_threads > PhCores:
56  ht_cores = n_threads-PhCores
57  effective_n_threads = PhCores + ht_cores * HtCoreWeight
58  return effective_n_threads
59 
60 #--------------------
61 
def scaleCores(n_threads)
def plotSpeedupsPyRoot.xtractTiming (   neif,
  nt,
  cFlag 
)

Definition at line 89 of file plotSpeedupsPyRoot.py.

89 def xtractTiming(neif,nt,cFlag):
90  filename = createFname(neif,nt,cFlag)
91  ifile = open(filename,"r")
92  seconds=-1
93  for line in ifile:
94  if "seconds" in line:
95  line=line[:-1]
96  seconds = float(line.split(" ")[-1])
97  break
98  ifile.close()
99  if seconds==-1:
100  seconds=xtractTiming(neif,nts[nts.index(nt)-1],cFlag)
101  return seconds
102 
103 #--------------------
104 
def createFname(neif, nt, cFlag)
def xtractTiming(neif, nt, cFlag)

Variable Documentation

plotSpeedupsPyRoot.canvas = TCanvas("Speedup","Speedup",2048,1800)

Definition at line 157 of file plotSpeedupsPyRoot.py.

list plotSpeedupsPyRoot.cFlags = ["True","False"]

Definition at line 22 of file plotSpeedupsPyRoot.py.

int plotSpeedupsPyRoot.counter = 1

Definition at line 141 of file plotSpeedupsPyRoot.py.

string plotSpeedupsPyRoot.fname_template = "measurement_BrunelScenario_n100_eif%s_aif100_nthreads%s_c%s_dqFalse_v5.log"

Definition at line 16 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.graph = TGraph(len_nt)

Definition at line 134 of file plotSpeedupsPyRoot.py.

int plotSpeedupsPyRoot.graph_counter = 0

Definition at line 43 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.graphc = TGraph(len_nt)

Definition at line 138 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.ht_cores = getText(12.,15,"Hardware Threaded Regime",LabelsSize,90,2,LabelsFont)

Definition at line 186 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.ht_weight = 0

Definition at line 190 of file plotSpeedupsPyRoot.py.

float plotSpeedupsPyRoot.HtCoreWeight = 0.4

Definition at line 47 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.idealSpeedup = TGraph(2)

Definition at line 120 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.is_text = getText(16,16.5,"Ideal (linear) Speedup", LabelsSize, 45, 918, LabelsFont)

Definition at line 188 of file plotSpeedupsPyRoot.py.

int plotSpeedupsPyRoot.LabelsFont = 12

Definition at line 49 of file plotSpeedupsPyRoot.py.

int plotSpeedupsPyRoot.LabelsSize = .6

Definition at line 50 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.legend = TLegend(.1,.45,.38,.9)

Definition at line 175 of file plotSpeedupsPyRoot.py.

string plotSpeedupsPyRoot.LegendDrawOpts = "lp"

Definition at line 27 of file plotSpeedupsPyRoot.py.

int plotSpeedupsPyRoot.len_nt = len(nts)+1

Definition at line 118 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.line = TLine(11,0,11,25)

Definition at line 164 of file plotSpeedupsPyRoot.py.

list plotSpeedupsPyRoot.LineColours
Initial value:
1 = [kRed,
2  kBlue,
3  kGreen+2,
4  kOrange,
5  kPink+10,
6  kViolet+10]

Definition at line 28 of file plotSpeedupsPyRoot.py.

int plotSpeedupsPyRoot.LineStyle = 7

Definition at line 42 of file plotSpeedupsPyRoot.py.

int plotSpeedupsPyRoot.LineWidth = 6

Definition at line 41 of file plotSpeedupsPyRoot.py.

int plotSpeedupsPyRoot.MarkerSize = 4

Definition at line 40 of file plotSpeedupsPyRoot.py.

list plotSpeedupsPyRoot.MarkerStyles
Initial value:
1 = [kFullCircle,
2  kOpenCross,
3  kFullTriangleUp,
4  kOpenStar,
5  kFullCross,
6  kOpenCircle]

Definition at line 34 of file plotSpeedupsPyRoot.py.

list plotSpeedupsPyRoot.neif_graphs = []

Definition at line 132 of file plotSpeedupsPyRoot.py.

list plotSpeedupsPyRoot.neif_l = [1,2,3,5,20,30]

Definition at line 18 of file plotSpeedupsPyRoot.py.

list plotSpeedupsPyRoot.nts = [2,3,5,10,11,12,13,15,23]

Definition at line 20 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.ph_cores = getText(10.5,15,"Physical Cores",LabelsSize,90,2,LabelsFont)

Definition at line 184 of file plotSpeedupsPyRoot.py.

int plotSpeedupsPyRoot.PhCores = 11

Definition at line 45 of file plotSpeedupsPyRoot.py.

float plotSpeedupsPyRoot.ScalarTime = 1640.87

Definition at line 24 of file plotSpeedupsPyRoot.py.

string plotSpeedupsPyRoot.scaled_s = ""

Definition at line 123 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.scaled_tn = tn

Definition at line 143 of file plotSpeedupsPyRoot.py.

bool plotSpeedupsPyRoot.scaleThreads = False

Definition at line 106 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.time = xtractTiming(neif,tn,False)

Definition at line 146 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.timec = xtractTiming(neif,tn,True)

Definition at line 148 of file plotSpeedupsPyRoot.py.

int plotSpeedupsPyRoot.TotalCores = 24

Definition at line 46 of file plotSpeedupsPyRoot.py.