[cig-commits] r13314 - short/3D/PyLith/trunk/playpen/memcheck
brad at geodynamics.org
brad at geodynamics.org
Fri Nov 14 15:30:07 PST 2008
Author: brad
Date: 2008-11-14 15:30:06 -0800 (Fri, 14 Nov 2008)
New Revision: 13314
Added:
short/3D/PyLith/trunk/playpen/memcheck/benchmark_dynhspace_tet4_lagrit.cfg
Modified:
short/3D/PyLith/trunk/playpen/memcheck/memory_usage.py
Log:
Added vertex coordinates to memory calculation.
Added: short/3D/PyLith/trunk/playpen/memcheck/benchmark_dynhspace_tet4_lagrit.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/memcheck/benchmark_dynhspace_tet4_lagrit.cfg (rev 0)
+++ short/3D/PyLith/trunk/playpen/memcheck/benchmark_dynhspace_tet4_lagrit.cfg 2008-11-14 23:30:06 UTC (rev 13314)
@@ -0,0 +1,37 @@
+[memoryusage]
+
+vertex_groups = [fault,bc_xmin,bc_xmax,bc_ymin,bc_ymax,bc_zmin,bc_zmax]
+
+[memoryusage.mesh]
+
+cell_type = tet4
+ncells = 1262049
+nvertices = 232897
+
+[memoryusage.vertex_groups.fault]
+label = fault
+size = 861
+
+[memoryusage.vertex_groups.bc_xmin]
+label = elemfaces_xmin
+size = 4753
+
+[memoryusage.vertex_groups.bc_xmax]
+label = elemfaces_xmax
+size = 4753
+
+[memoryusage.vertex_groups.bc_ymin]
+label = elemfaces_ymin
+size = 2401
+
+[memoryusage.vertex_groups.bc_ymax]
+label = elemfaces_ymax
+size = 2401
+
+[memoryusage.vertex_groups.bc_zmin]
+label = elemfaces_zmin
+size = 4753
+
+[memoryusage.vertex_groups.bc_zmax]
+label = elemfaces_zmax
+size = 4753
Modified: short/3D/PyLith/trunk/playpen/memcheck/memory_usage.py
===================================================================
--- short/3D/PyLith/trunk/playpen/memcheck/memory_usage.py 2008-11-14 22:08:23 UTC (rev 13313)
+++ short/3D/PyLith/trunk/playpen/memcheck/memory_usage.py 2008-11-14 23:30:06 UTC (rev 13314)
@@ -88,6 +88,7 @@
self.nvertices = 0
self.ncells = 0
self.coneSize = 0
+ self.dimension = 0
return
@@ -95,14 +96,20 @@
"""
Initialize application.
"""
- info = {'tri3': 3,
- 'quad4': 4,
- 'tet4': 4,
- 'hex8': 8,
- }
+ coneSize = {'tri3': 3,
+ 'quad4': 4,
+ 'tet4': 4,
+ 'hex8': 8,
+ }
+ dimension = {'tri3': 2,
+ 'quad4': 2,
+ 'tet4': 3,
+ 'hex8': 3,
+ }
try:
- self.coneSize = info[self.cellType]
+ self.coneSize = coneSize[self.cellType]
+ self.dimension = dimension[self.cellType]
except:
raise ValueError("Unknown cell type '%'." % self.cellType)
return
@@ -118,10 +125,12 @@
ncells = self.ncells
nvertices = self.nvertices
coneSize = self.coneSize
+ dimension = self.dimension
# mesh
nbytes = sizeInt * ( 2 * (coneSize*ncells + nvertices + ncells) + \
coneSize*ncells )
+ nbytes += sizeDouble * nvertices * dimension
memory['mesh'] = nbytes
# stratification
More information about the CIG-COMMITS
mailing list