[cig-commits] r12794 - short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs

brad at geodynamics.org brad at geodynamics.org
Wed Sep 3 14:30:26 PDT 2008


Author: brad
Date: 2008-09-03 14:30:25 -0700 (Wed, 03 Sep 2008)
New Revision: 12794

Modified:
   short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/plot_summary.py
   short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/runstats.py
Log:
Updated for v1.3.

Modified: short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/plot_summary.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/plot_summary.py	2008-09-03 19:45:28 UTC (rev 12793)
+++ short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/plot_summary.py	2008-09-03 21:30:25 UTC (rev 12794)
@@ -10,19 +10,39 @@
 # ======================================================================
 #
 
+fileSuffix = "eps"
+
 import pylab
+from mypylab.Figure import Figure
 
-from runstats import data
+from runstats import data_v1_3 as data
 
-class PlotSummary(object):
+# ----------------------------------------------------------------------
+class PlotSummary(Figure):
 
     def __init__(self):
+        Figure.__init__(self, fontsize=12)
         return
 
     def main(self):
 
-        self._setup()
+        width = 9.25
+        height = 8.5
+        self.open(width, height, margins=[[0.45, 0.6, 0.1],
+                                          [0.25, 0.65, 0.30]])
+        self.nrows = 3
+        self.ncols = 3
 
+        self.resolutions = [1000, 500, 250]
+        self.shapes = ["Tet4", "Hex8"]
+
+        self.width = 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.colorShapes = {'Tet4': 'orange',
+                            'Hex8': 'blue'}
+        
         plots = [{'value': "nvertices",
                   'title': "# Vertices",
                   'log': True,
@@ -34,7 +54,7 @@
                  {'value': "memory",
                   'title': "Peak Memory Usage (MB)",
                   'log': True,
-                  'range': (1e+1, 1e+4)},
+                  'range': (1e+1, 2e+4)},
                  {'value': "niterations",
                   'title': "# Iterations in Solve",
                   'log': False,
@@ -42,18 +62,20 @@
                  {'value': "run_time",
                   'title': "Run Time (s)",
                   'log': True,
-                  'range': (1e+1, 1e+3)},
+                  'range': (1e+1, 3e+3)},
                  {'value': "nflops",
                   'title': "# FLOPS",
                   'log': True,
-                  'range': (1e+8, 1e+11)},
+                  'range': (1e+8, 3e+11)},
                  {'value': "error",
                   'title': "Average Error (m)",
                   'log': True,
                   'range': (1e-5, 1e-2)}]
-        iplot = 1
+        irow = 0
+        icol = 0
         for plot in plots:
-            pylab.subplot(self.nrows, self.ncols, iplot)
+            self.axes(self.nrows, self.ncols, irow+1, icol+1)
+
             offset = 0
             handles = []
             for shape in self.shapes:
@@ -66,74 +88,26 @@
                               color=self.colorShapes[shape])
                 handles.append(h)
                 offset += 1
-            pylab.title(plot['title'],
-                        fontsize=self.titleFontSize)
-            pylab.xticks(self.locs, ["%sm" % res for res in self.resolutions],
-                         fontsize=self.labelFontSize)
-            pylab.yticks(fontsize=self.labelFontSize)
+            pylab.title(plot['title'])
+            pylab.xticks(self.locs, ["%sm" % res for res in self.resolutions])
             if not plot['range'] is None:
                 pylab.ylim(plot['range'])
-            iplot += 1
+            icol += 1
+            if icol >= self.ncols:
+                icol = 0
+                irow += 1
 
-        pylab.subplot(self.nrows, self.ncols, iplot)
+        self.subplot(self.nrows, self.ncols, irow+1, icol+1)
         pylab.axis('off')
         pylab.legend((handles[0][0], handles[1][0]), self.shapes,
                      shadow=True,
                      loc='center')
 
         pylab.show()
-        pylab.savefig('benchmark_summary')
+        pylab.savefig('benchmark_summary.%s' % fileSuffix)
         return
 
-    def _setup(self):
-        figWidth = 9.25
-        figHeight = 8.5
-        colors = {'fg': (0,0,0),
-                  'bg': (1,1,1),
-                  'dkgray': 0.25,
-                  'mdgray': 0.5,
-                  'ltgray': 0.75,
-                  'dkslate': (0.18, 0.21, 0.28),
-                  'slate': (0.45, 0.50, 0.68),
-                  'ltorange': (1.0, 0.74, 0.41),
-                  'orange': (0.96, 0.50, 0.0),
-                  'ltred': (1.0, 0.25, 0.25),
-                  'red': (0.79, 0.00, 0.01),
-                  'ltblue': (0.2, 0.73, 1.0),
-                  'blue': (0.12, 0.43, 0.59),
-                  'green': (0.37, 0.80, 0.05),
-                  'green': (0.23, 0.49, 0.03)}
-        from matplotlib.colors import colorConverter
-        for key in colors.keys():
-            colorConverter.colors[key] = colors[key]
-        self.titleFontSize = 18
-        self.labelFontSize = 14
 
-        self.nrows = 3
-        self.ncols = 3
-
-        self.resolutions = [1000, 500, 250]
-        self.shapes = ["Tet4", "Hex8"]
-
-        self.width = 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.colorShapes = {'Tet4': 'orange',
-                            'Hex8': 'blue'}
-
-        pylab.figure(figsize=(figWidth, figHeight),
-                     facecolor='bg',
-                     dpi=90)
-        pylab.subplots_adjust(left=0.04,
-                              right=0.96,
-                              bottom=0.03,
-                              top=0.96,
-                              wspace=0.22,
-                              hspace=0.35)
-        return
-
-
 # ----------------------------------------------------------------------
 if __name__ == "__main__":
   app = PlotSummary()

Modified: short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/runstats.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/runstats.py	2008-09-03 19:45:28 UTC (rev 12793)
+++ short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/figs/runstats.py	2008-09-03 21:30:25 UTC (rev 12794)
@@ -10,8 +10,11 @@
 # ======================================================================
 #
 
+# ----------------------------------------------------------------------
+# Version 1.1
+# ----------------------------------------------------------------------
 # Hydra (2.2 GHz Opteron)
-data = {
+data_v1_1 = {
     "Tet4 1000m": {
         'ncells': 79756,
         'nvertices': 15625,
@@ -69,7 +72,7 @@
     }
 
 # Hydra (2.2 GHz Opteron)
-dataScaling = {
+dataScaling_v1_1 = {
     "Tet4":
     [{'nprocs': 1,
       'total': 380.6,
@@ -105,3 +108,102 @@
        'distribute': 52.2},
       ]
     }
+
+# ----------------------------------------------------------------------
+# Version 1.3
+# ----------------------------------------------------------------------
+# Hydra (2.2 GHz Opteron)
+data_v1_3 = {
+    "Tet4 1000m": {
+        'ncells': 79756,
+        'nvertices': 15625,
+        'nflops': 9.957e+08,
+        'run_time': 31.2,
+        'error': 1.41e-03,
+        'niterations': 59,
+        'memory': 235},
+
+    "Hex8 1000m": {
+        'ncells': 13824,
+        'nvertices': 15625,
+        'nflops': 1.976e+09,
+        'run_time': 14.0,
+        'error': 6.58e-04,
+        'niterations': 38,
+        'memory': 229},
+
+    "Tet4 500m": {
+        'ncells': 661929,
+        'nvertices': 117649,
+        'nflops': 1.297e+10,
+        'run_time': 271.0,
+        'error': 4.79e-04,
+        'niterations': 107,
+        'memory': 1709.0},
+
+    "Hex8 500m": {
+        'ncells': 110592,
+        'nvertices': 117649,
+        'nflops': 2.165e+10,
+        'run_time': 126.5,
+        'error': 1.94e-04,
+        'niterations': 70,
+        'memory': 1710.8},
+
+
+    "Tet4 250m": {
+        'ncells': 5244768,
+        'nvertices': 912673,
+        'nflops': 2.093e+11,
+        'run_time': 2.653e+03,
+        'error': 1.30e-04,
+        'niterations': 228,
+        'memory': 12000.0},
+
+    "Hex8 250m" : {
+        'ncells': 884736,
+        'nvertices': 912673,
+        'nflops': 2.521e+11,
+        'run_time': 1.330e+03,
+        'error': 7.70e-05,
+        'niterations': 134,
+        'memory': 12000.0}
+    }
+
+# Hydra (2.2 GHz Opteron)
+dataScaling_v1_3 = {
+    "Tet4":
+    [{'nprocs': 1,
+      'total': 271.0,
+      'distribute': 0.0},
+     {'nprocs': 2,
+      'total': 456.5,
+      'distribute': 181.1},
+     {'nprocs': 4,
+      'total': 0,
+      'distribute': 0},
+     {'nprocs': 8,
+      'total': 0,
+      'distribute': 0},
+     {'nprocs': 16,
+      'total': 0,
+      'distribute': 0},
+     ],
+    "Hex8":
+     [{'nprocs': 1,
+       'total': 126.5,
+       'distribute': 0.0},
+      {'nprocs': 2,
+       'total': 189.0,
+       'distribute': 33.3},
+      {'nprocs': 4,
+       'total': 0,
+       'distribute': 0},
+      {'nprocs': 8,
+       'total': 0,
+       'distribute': 0},
+      {'nprocs': 16,
+       'total': 0,
+       'distribute': 0},
+      ]
+    }



More information about the cig-commits mailing list