| The Gaudi Framework v32r1 (f65d50dc)

Functions | Variables
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 = [kRed, kBlue, kGreen + 2, kOrange, kPink + 10, kViolet + 10]
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
def | time = xtractTiming(neif, tn, False)
def | timec = xtractTiming(neif, tn, True)
| canvas = TCanvas("Speedup", "Speedup", 2048, 1800)
| line = TLine(11, 0, 11, 25)
| legend = TLegend(.1, .45, .38, .9)
def | ph_cores = getText(10.5, 15, "Physical Cores", LabelsSize, 90, 2, LabelsFont)
def | ht_cores
def | is_text
int | ht_weight = 0

## Function Documentation

## ◆ createFname()

def plotSpeedupsPyRoot.createFname | ( |  | neif,
|  |  | nt,
|  |  | cFlag
| ) |  |

Definition at line 86 of file plotSpeedupsPyRoot.py.

86 def createFname(neif, nt, cFlag):
87 return fname_template % (neif, nt, cFlag)
88
89
90 # --------------------
91
92
plotSpeedupsPyRoot.createFname
def createFname(neif, nt, cFlag)
Definition: plotSpeedupsPyRoot.py:86

## ◆ formatGraphs()

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 # --------------------
84
85
plotSpeedupsPyRoot.formatGraphs
def formatGraphs(graph, graphc)
Definition: plotSpeedupsPyRoot.py:70

## ◆ getText()

def plotSpeedupsPyRoot.getText | ( |  | x,
|  |  | y,
|  |  | text,
|  |  | scale,
|  |  | angle,
|  |  | colour,
|  |  | font
| ) |  |

Definition at line 58 of file plotSpeedupsPyRoot.py.

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

## ◆ scaleCores()

def plotSpeedupsPyRoot.scaleCores | ( |  | n_threads | ) |

Definition at line 47 of file plotSpeedupsPyRoot.py.

47 def scaleCores(n_threads):
48 effective_n_threads = n_threads
49 if effective_n_threads > PhCores:
50 ht_cores = n_threads - PhCores
51 effective_n_threads = PhCores + ht_cores * HtCoreWeight
52 return effective_n_threads
53
54
55 # --------------------
56
57
plotSpeedupsPyRoot.scaleCores
def scaleCores(n_threads)
Definition: plotSpeedupsPyRoot.py:47

## ◆ xtractTiming()

def plotSpeedupsPyRoot.xtractTiming | ( |  | neif,
|  |  | nt,
|  |  | cFlag
| ) |  |

Definition at line 93 of file plotSpeedupsPyRoot.py.

93 def xtractTiming(neif, nt, cFlag):
94 filename = createFname(neif, nt, cFlag)
95 ifile = open(filename, "r")
96 seconds = -1
97 for line in ifile:
98 if "seconds" in line:
99 line = line[:-1]
100 seconds = float(line.split(" ")[-1])
101 break
102 ifile.close()
103 if seconds == -1:
104 seconds = xtractTiming(neif, nts[nts.index(nt) - 1], cFlag)
105 return seconds
106
107
108 # --------------------
109
plotSpeedupsPyRoot.createFname
def createFname(neif, nt, cFlag)
Definition: plotSpeedupsPyRoot.py:86
plotSpeedupsPyRoot.xtractTiming
def xtractTiming(neif, nt, cFlag)
Definition: plotSpeedupsPyRoot.py:93

## Variable Documentation

## ◆ canvas

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

Definition at line 163 of file plotSpeedupsPyRoot.py.

## ◆ cFlags

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

Definition at line 21 of file plotSpeedupsPyRoot.py.

## ◆ counter

int plotSpeedupsPyRoot.counter = 1

Definition at line 147 of file plotSpeedupsPyRoot.py.

## ◆ fname_template

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

Definition at line 15 of file plotSpeedupsPyRoot.py.

## ◆ graph

plotSpeedupsPyRoot.graph = TGraph(len_nt)

Definition at line 140 of file plotSpeedupsPyRoot.py.

## ◆ graph_counter

int plotSpeedupsPyRoot.graph_counter = 0

Definition at line 35 of file plotSpeedupsPyRoot.py.

## ◆ graphc

plotSpeedupsPyRoot.graphc = TGraph(len_nt)

Definition at line 144 of file plotSpeedupsPyRoot.py.

## ◆ ht_cores

def plotSpeedupsPyRoot.ht_cores

Initial value:
1 = getText(12., 15, "Hardware Threaded Regime", LabelsSize, 90, 2,
2 LabelsFont)
plotSpeedupsPyRoot.getText
def getText(x, y, text, scale, angle, colour, font)
Definition: plotSpeedupsPyRoot.py:58

Definition at line 192 of file plotSpeedupsPyRoot.py.

## ◆ ht_weight

def plotSpeedupsPyRoot.ht_weight = 0

Definition at line 198 of file plotSpeedupsPyRoot.py.

## ◆ HtCoreWeight

float plotSpeedupsPyRoot.HtCoreWeight = 0.4

Definition at line 39 of file plotSpeedupsPyRoot.py.

## ◆ idealSpeedup

plotSpeedupsPyRoot.idealSpeedup = TGraph(2)

Definition at line 124 of file plotSpeedupsPyRoot.py.

## ◆ is_text

def plotSpeedupsPyRoot.is_text

Initial value:
1 = getText(16, 16.5, "Ideal (linear) Speedup", LabelsSize, 45, 918,
2 LabelsFont)
plotSpeedupsPyRoot.getText
def getText(x, y, text, scale, angle, colour, font)
Definition: plotSpeedupsPyRoot.py:58

Definition at line 195 of file plotSpeedupsPyRoot.py.

## ◆ LabelsFont

int plotSpeedupsPyRoot.LabelsFont = 12

Definition at line 41 of file plotSpeedupsPyRoot.py.

## ◆ LabelsSize

int plotSpeedupsPyRoot.LabelsSize = .6

Definition at line 42 of file plotSpeedupsPyRoot.py.

## ◆ legend

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

Definition at line 181 of file plotSpeedupsPyRoot.py.

## ◆ LegendDrawOpts

string plotSpeedupsPyRoot.LegendDrawOpts = "lp"

Definition at line 26 of file plotSpeedupsPyRoot.py.

## ◆ len_nt

int plotSpeedupsPyRoot.len_nt = len(nts) + 1

Definition at line 122 of file plotSpeedupsPyRoot.py.

## ◆ line

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

Definition at line 170 of file plotSpeedupsPyRoot.py.

## ◆ LineColours

list plotSpeedupsPyRoot.LineColours = [kRed, kBlue, kGreen + 2, kOrange, kPink + 10, kViolet + 10]

Definition at line 27 of file plotSpeedupsPyRoot.py.

## ◆ LineStyle

int plotSpeedupsPyRoot.LineStyle = 7

Definition at line 34 of file plotSpeedupsPyRoot.py.

## ◆ LineWidth

int plotSpeedupsPyRoot.LineWidth = 6

Definition at line 33 of file plotSpeedupsPyRoot.py.

## ◆ MarkerSize

int plotSpeedupsPyRoot.MarkerSize = 4

Definition at line 32 of file plotSpeedupsPyRoot.py.

## ◆ MarkerStyles

list plotSpeedupsPyRoot.MarkerStyles

Initial value:
1 = [
2 kFullCircle, kOpenCross, kFullTriangleUp, kOpenStar, kFullCross,
3 kOpenCircle
4 ]

Definition at line 28 of file plotSpeedupsPyRoot.py.

## ◆ neif_graphs

list plotSpeedupsPyRoot.neif_graphs = []

Definition at line 138 of file plotSpeedupsPyRoot.py.

## ◆ neif_l

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

Definition at line 17 of file plotSpeedupsPyRoot.py.

## ◆ nts

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

Definition at line 19 of file plotSpeedupsPyRoot.py.

## ◆ ph_cores

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

Definition at line 190 of file plotSpeedupsPyRoot.py.

## ◆ PhCores

int plotSpeedupsPyRoot.PhCores = 11

Definition at line 37 of file plotSpeedupsPyRoot.py.

## ◆ ScalarTime

float plotSpeedupsPyRoot.ScalarTime = 1640.87

Definition at line 23 of file plotSpeedupsPyRoot.py.

## ◆ scaled_s

string plotSpeedupsPyRoot.scaled_s = ""

Definition at line 127 of file plotSpeedupsPyRoot.py.

## ◆ scaled_tn

def plotSpeedupsPyRoot.scaled_tn = tn

Definition at line 149 of file plotSpeedupsPyRoot.py.

## ◆ scaleThreads

bool plotSpeedupsPyRoot.scaleThreads = False

Definition at line 111 of file plotSpeedupsPyRoot.py.

## ◆ time

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

Definition at line 152 of file plotSpeedupsPyRoot.py.

## ◆ timec

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

Definition at line 154 of file plotSpeedupsPyRoot.py.

## ◆ TotalCores

int plotSpeedupsPyRoot.TotalCores = 24

Definition at line 38 of file plotSpeedupsPyRoot.py.