[cig-commits] r13644 - short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs
brad at geodynamics.org
brad at geodynamics.org
Wed Dec 10 16:19:32 PST 2008
Author: brad
Date: 2008-12-10 16:19:32 -0800 (Wed, 10 Dec 2008)
New Revision: 13644
Modified:
short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/plot_scaling.py
short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/plot_summary.py
Log:
Updated.
Modified: short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/plot_scaling.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/plot_scaling.py 2008-12-10 21:07:27 UTC (rev 13643)
+++ short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/plot_scaling.py 2008-12-11 00:19:32 UTC (rev 13644)
@@ -10,9 +10,9 @@
# ======================================================================
#
-plotSize = "manual"
+plotSize = "poster"
color = "lightbg"
-fileSuffix = "pdf"
+fileSuffix = "eps"
# ======================================================================
import pylab
@@ -24,8 +24,9 @@
class PlotScaling(Figure):
def __init__(self):
+
if plotSize == "poster":
- fontsize = 21
+ fontsize = 18
elif plotSize == "presentation":
fontsize = 14
elif plotSize == "manual":
@@ -41,7 +42,7 @@
if plotSize == "poster":
self.width = 6.5
self.height = 5.75
- margins = [[0.90, 0, 0.05], [0.70, 0, 0.12]]
+ margins = [[0.90, 0, 0.05], [0.70, 0, 0.3]]
elif plotSize == "presentation":
self.width = 4.0
self.height = 5.0
@@ -80,18 +81,31 @@
linestyle="--",
marker='+')
handles.append(h)
- pylab.title("Runtime versus Number of Processors")
- pylab.xlabel("Number of Processors")
- pylab.ylabel("Runtime (s)")
- pylab.xlim(0.5, 32)
- pylab.ylim(5.0e+0, 8.0e+2)
labels += ["%s total" % shape, "%s compute" % shape]
+ time2 = compute[1] # runtime for 2 procs
+ strongScaling = [[1.0, 16.0],
+ [2.0*time2, time2/8.0]]
+ pylab.plot(strongScaling[0], strongScaling[1],
+ linestyle=':',
+ color='ltred')
+
+ pylab.title("Runtime versus Number of Processors")
+ pylab.xlabel("Number of Processors")
+ pylab.ylabel("Runtime (s)")
+ pylab.xlim(0.5, 32)
+ pylab.ylim(5.0e+0, 8.0e+2)
+
pylab.legend((handles[0][0], handles[1][0],
handles[2][0], handles[3][0]),
labels,
shadow=True,
loc='lower left')
+ pylab.text(4.5, 19, 'Strong scaling',
+ rotation=-35.0,
+ verticalalignment='top',
+ horizontalalignment='left',
+ color='ltred')
pylab.show()
pylab.savefig("benchmark_scaling.%s" % fileSuffix)
Modified: short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/plot_summary.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/plot_summary.py 2008-12-10 21:07:27 UTC (rev 13643)
+++ short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/plot_summary.py 2008-12-11 00:19:32 UTC (rev 13644)
@@ -10,8 +10,11 @@
# ======================================================================
#
-fileSuffix = "pdf"
+plotSize = "poster"
+color = "lightbg"
+fileSuffix = "eps"
+# ======================================================================
import pylab
from mypylab.Figure import Figure
@@ -21,24 +24,44 @@
class PlotSummary(Figure):
def __init__(self):
- Figure.__init__(self, fontsize=12)
+ if plotSize == "poster":
+ fontsize = 14
+ elif plotSize == "presentation":
+ fontsize = 14
+ elif plotSize == "manual":
+ fontsize = 10
+ else:
+ raise ValueError("Unknown plotSize '%s'." % plotSize)
+ Figure.__init__(self, color=color, fontsize=fontsize)
return
def main(self):
- width = 9.25
- height = 8.5
- self.open(width, height, margins=[[0.45, 0.6, 0.1],
- [0.25, 0.65, 0.30]])
+ if plotSize == "poster":
+ self.width = 8.75
+ self.height = 6.75
+ margins = [[0.5, 0.6, 0.1], [0.25, 0.55, 0.30]]
+ elif plotSize == "presentation":
+ self.width = 4.0
+ self.height = 5.0
+ margins = [[0.7, 0, 0.05], [0.5, 0, 0.1]]
+ elif plotSize == "manual":
+ self.width = 5.5
+ self.height = 5.0
+ margins = [[0.6, 0, 0.05], [0.5, 0, 0.25]]
+ else:
+ raise ValueError("Unknown plotSize '%s'." % plotSize)
+
+ self.open(self.width, self.height, margins=margins)
self.nrows = 3
self.ncols = 3
self.resolutions = [1000, 500, 250]
self.shapes = ["Tet4", "Hex8"]
- self.width = 1.0/(len(self.shapes)+1)
+ self.barwidth = 1.0/(len(self.shapes)+1)
self.locs = pylab.arange(len(self.resolutions))
- self.loc0 = self.locs - 0.5*len(self.shapes)*self.width
+ self.loc0 = self.locs - 0.5*len(self.shapes)*self.barwidth
self.colorShapes = {'Tet4': 'orange',
'Hex8': 'blue'}
@@ -82,8 +105,8 @@
format = shape + " " + "%dm"
keys = [format % res for res in self.resolutions]
d = [data[key][plot['value']] for key in keys]
- h = pylab.bar(self.loc0+offset*self.width, d,
- self.width,
+ h = pylab.bar(self.loc0+offset*self.barwidth, d,
+ self.barwidth,
log=plot['log'],
color=self.colorShapes[shape])
handles.append(h)
More information about the CIG-COMMITS
mailing list