| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

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
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
| is_text
int | ht_weight = 0

## Function Documentation

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

Definition at line 89 of file plotSpeedupsPyRoot.py.

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

def plotSpeedupsPyRoot.formatGraphs | ( |  | graph,
|  |  | graphc
| ) |  |

Definition at line 74 of file plotSpeedupsPyRoot.py.

74 def formatGraphs(graph, graphc):
75 global graph_counter
76 graphc.SetLineStyle(LineStyle)
77 graphs = (graph, graphc)
78 for g in graphs:
79 g.SetLineWidth(LineWidth)
80 g.SetMarkerSize(MarkerSize)
81 g.SetMarkerStyle(MarkerStyles[graph_counter])
82 g.SetLineColor(LineColours[graph_counter])
83 g.SetMarkerColor(LineColours[graph_counter])
84 graph_counter += 1
85
86 #--------------------
87
88
plotSpeedupsPyRoot.formatGraphs
def formatGraphs(graph, graphc)
Definition: plotSpeedupsPyRoot.py:74

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

Definition at line 64 of file plotSpeedupsPyRoot.py.

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

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

Definition at line 54 of file plotSpeedupsPyRoot.py.

54 def scaleCores(n_threads):
55 effective_n_threads = n_threads
56 if effective_n_threads > PhCores:
57 ht_cores = n_threads - PhCores
58 effective_n_threads = PhCores + ht_cores * HtCoreWeight
59 return effective_n_threads
60
61 #--------------------
62
63
plotSpeedupsPyRoot.scaleCores
def scaleCores(n_threads)
Definition: plotSpeedupsPyRoot.py:54

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

Definition at line 95 of file plotSpeedupsPyRoot.py.

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

## Variable Documentation

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

Definition at line 165 of file plotSpeedupsPyRoot.py.

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

Definition at line 22 of file plotSpeedupsPyRoot.py.

int plotSpeedupsPyRoot.counter = 1

Definition at line 149 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 142 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 146 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.ht_cores

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

Definition at line 194 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.ht_weight = 0

Definition at line 200 of file plotSpeedupsPyRoot.py.

float plotSpeedupsPyRoot.HtCoreWeight = 0.4

Definition at line 47 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.idealSpeedup = TGraph(2)

Definition at line 127 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.is_text

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

Definition at line 197 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 183 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 125 of file plotSpeedupsPyRoot.py.

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

Definition at line 172 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 140 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 192 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 130 of file plotSpeedupsPyRoot.py.

plotSpeedupsPyRoot.scaled_tn = tn

Definition at line 151 of file plotSpeedupsPyRoot.py.

bool plotSpeedupsPyRoot.scaleThreads = False

Definition at line 113 of file plotSpeedupsPyRoot.py.

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

Definition at line 154 of file plotSpeedupsPyRoot.py.

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

Definition at line 156 of file plotSpeedupsPyRoot.py.

int plotSpeedupsPyRoot.TotalCores = 24

Definition at line 46 of file plotSpeedupsPyRoot.py.