[cig-commits] r15165 - in short/3D/PyLith/trunk: . examples/3d/hex8 libsrc/bc libsrc/faults libsrc/feassemble libsrc/materials libsrc/meshio libsrc/problems modulesrc/utils pylith/apps pylith/perf pylith/problems
knepley at geodynamics.org
knepley at geodynamics.org
Tue Jun 9 17:44:04 PDT 2009
Author: knepley
Date: 2009-06-09 17:44:02 -0700 (Tue, 09 Jun 2009)
New Revision: 15165
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg
short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc
short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc
short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc
short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.cc
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc
short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.cc
short/3D/PyLith/trunk/libsrc/feassemble/IntegratorElasticity.cc
short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc
short/3D/PyLith/trunk/libsrc/materials/Material.cc
short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.cc
short/3D/PyLith/trunk/libsrc/meshio/MeshBuilder.cc
short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc
short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.cc
short/3D/PyLith/trunk/libsrc/problems/SolverLinear.cc
short/3D/PyLith/trunk/modulesrc/utils/Makefile.am
short/3D/PyLith/trunk/pylith/apps/PyLithApp.py
short/3D/PyLith/trunk/pylith/perf/MemoryLogger.py
short/3D/PyLith/trunk/pylith/problems/Formulation.py
short/3D/PyLith/trunk/pylith/problems/Implicit.py
Log:
More work on logging
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/TODO 2009-06-10 00:44:02 UTC (rev 15165)
@@ -5,19 +5,19 @@
Matt
Memory model
C++ Objects with fields
- DirichletBC (BoundarayConditionPoints::_parameters) ACCESSOR DONE
- DirichletBoundary (_outputFields)
- PointForce (BoundarayConditionPoints::_parameters) ACCESSOR DONE
- AbsorbingDampers (_parameters)
- Neumann (_parameters)
- SlipTimeFn (_parameters)
- FaultCohesiveKin (_fields)
- Quadrature (_geometryFields) [should be NULL]
- IntegratorElasticity (_outputFields)
- ElasticMaterial (_initialFields, _properties, _stateVars)
- OutputManager (_fields)
- CellFilterAvg (_fieldAvg)
- VertexFilterVecNorm (_fieldVecNorm)
+ DirichletBC (BoundaryConditionPoints::_parameters) ACCESSOR DONE
+ DirichletBoundary (_outputFields)
+ PointForce (BoundaryConditionPoints::_parameters) ACCESSOR DONE
+ AbsorbingDampers (_parameters)
+ Neumann (_parameters)
+ SlipTimeFn (_parameters)
+ FaultCohesiveKin (_fields)
+ Quadrature (_geometryFields) [should be NULL]
+ IntegratorElasticity (_outputFields)
+ ElasticMaterial (_initialFields, _properties, _stateVars)
+ OutputManager (_fields)
+ CellFilterAvg (_fieldAvg)
+ VertexFilterVecNorm (_fieldVecNorm)
field split
Modified: short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg 2009-06-10 00:44:02 UTC (rev 15165)
@@ -6,20 +6,20 @@
# ----------------------------------------------------------------------
# Turn on some journals to show progress.
[pylithapp.journal.info]
-timedependent = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshiocubit = 1
-implicitelasticity = 1
-faultcohesivekin = 1
-fiatlagrange = 1
+##timedependent = 1
+##implicit = 1
+##petsc = 1
+##solverlinear = 1
+##meshiocubit = 1
+##implicitelasticity = 1
+##faultcohesivekin = 1
+##fiatlagrange = 1
#quadrature3d = 1
[pylithapp.journal.debug]
-pylithapp = 1
-problem = 1
-implicit = 1
+##pylithapp = 1
+##problem = 1
+##implicit = 1
# ----------------------------------------------------------------------
# mesh_generator
@@ -76,9 +76,9 @@
[pylithapp.petsc]
ksp_rtol = 1.0e-8
pc_type = asm
-ksp_monitor = true
-ksp_view = true
-log_summary = true
+##ksp_monitor = true
+##ksp_view = true
+##log_summary = true
ksp_max_it = 100
ksp_gmres_restart = 50
#start_in_debugger = true
Modified: short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -83,6 +83,8 @@
const int numQuadPts = _quadrature->numQuadPts();
const int spaceDim = cellGeometry.spaceDim();
const int fiberDim = numQuadPts * spaceDim;
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("BoundaryConditions");
delete _parameters;
_parameters =
@@ -94,6 +96,8 @@
dampingConsts.newSection(cells, fiberDim);
dampingConsts.allocate();
+ logger.stagePop();
+
// Containers for orientation information
const int orientationSize = spaceDim * spaceDim;
const int jacobianSize = spaceDim * cellDim;
Modified: short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -121,6 +121,8 @@
const int numPoints = _points.size();
const int numFixedDOF = _bcDOF.size();
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("BoundaryConditions");
double_array bufferVertex(fiberDim);
if (!_outputFields->hasField("buffer (vector)")) {
@@ -157,6 +159,7 @@
bufferSection->updatePointAll(point, &bufferVertex[0]);
} // for
+ logger.stagePop();
return buffer;
} // _bufferVector
Modified: short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Neumann.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/bc/Neumann.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -83,6 +83,8 @@
const int numQuadPts = _quadrature->numQuadPts();
const int spaceDim = cellGeometry.spaceDim();
const int fiberDim = spaceDim * numQuadPts;
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("BoundaryConditions");
delete _parameters;
_parameters =
@@ -95,6 +97,8 @@
traction.scale(pressureScale);
traction.vectorFieldType(topology::FieldBase::VECTOR);
+ logger.stagePop();
+
// Containers for orientation information
const int orientationSize = spaceDim * spaceDim;
const int jacobianSize = spaceDim * cellDim;
Modified: short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -86,6 +86,8 @@
delete _parameters;
_parameters = new topology::Fields<topology::Field<topology::Mesh> >(mesh);
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("BoundaryConditions");
// Create section to hold time dependent values
_parameters->add("value", fieldName);
@@ -175,6 +177,7 @@
_dbTimeHistory->open();
} // if
+ logger.stagePop();
} // _queryDatabases
// ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -77,6 +77,8 @@
assert(!vertices.isNull());
const label_sequence::iterator verticesBegin = vertices->begin();
const label_sequence::iterator verticesEnd = vertices->end();
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("Fault");
delete _parameters; _parameters = new topology::Fields<topology::Field<topology::SubMesh> >(faultMesh);
assert(0 != _parameters);
@@ -107,6 +109,8 @@
const ALE::Obj<RealSection>& riseTimeSection = riseTime.section();
assert(!riseTimeSection.isNull());
+ logger.stagePop();
+
// Open databases and set query values
_dbFinalSlip->open();
switch (spaceDim)
Modified: short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -75,6 +75,8 @@
assert(!vertices.isNull());
const label_sequence::iterator verticesBegin = vertices->begin();
const label_sequence::iterator verticesEnd = vertices->end();
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("Fault");
delete _parameters; _parameters = new topology::Fields<topology::Field<topology::SubMesh> >(faultMesh);
assert(0 != _parameters);
@@ -96,6 +98,8 @@
const ALE::Obj<RealSection>& slipTimeSection = slipTime.section();
assert(!slipTimeSection.isNull());
+ logger.stagePop();
+
// Open databases and set query values
_dbSlipRate->open();
switch (spaceDim)
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -110,6 +110,8 @@
assert(0 != src);
src->initialize(*_faultMesh, *_normalizer);
} // for
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("Fault");
// Allocate slip field
const ALE::Obj<SieveSubMesh>& faultSieveMesh = _faultMesh->sieveMesh();
@@ -146,6 +148,8 @@
// Compute tributary area for each vertex in fault mesh.
_calcArea();
+
+ logger.stagePop();
} // initialize
// ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -77,6 +77,8 @@
assert(!vertices.isNull());
const label_sequence::iterator verticesBegin = vertices->begin();
const label_sequence::iterator verticesEnd = vertices->end();
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("Fault");
delete _parameters; _parameters = new topology::Fields<topology::Field<topology::SubMesh> >(faultMesh);
assert(0 != _parameters);
@@ -107,6 +109,8 @@
const ALE::Obj<RealSection>& riseTimeSection = riseTime.section();
assert(!riseTimeSection.isNull());
+ logger.stagePop();
+
// Open databases and set query values
_dbFinalSlip->open();
switch (spaceDim)
Modified: short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -73,6 +73,8 @@
assert(!vertices.isNull());
const label_sequence::iterator verticesBegin = vertices->begin();
const label_sequence::iterator verticesEnd = vertices->end();
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("Fault");
delete _parameters; _parameters = new topology::Fields<topology::Field<topology::SubMesh> >(faultMesh);
assert(0 != _parameters);
@@ -94,6 +96,8 @@
const ALE::Obj<RealSection>& slipTimeSection = slipTime.section();
assert(!slipTimeSection.isNull());
+ logger.stagePop();
+
// Open databases and set query values
_dbFinalSlip->open();
switch (spaceDim)
Modified: short/3D/PyLith/trunk/libsrc/feassemble/IntegratorElasticity.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/IntegratorElasticity.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/feassemble/IntegratorElasticity.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -397,6 +397,8 @@
const int tensorSize = _material->tensorSize();
if (!_outputFields->hasField("buffer (tensor)")) {
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("Problem");
_outputFields->add("buffer (tensor)", "buffer");
topology::Field<topology::Mesh>& buffer =
_outputFields->get("buffer (tensor)");
@@ -404,6 +406,7 @@
buffer.allocate();
buffer.vectorFieldType(topology::FieldBase::MULTI_TENSOR);
buffer.addDimensionOkay(true);
+ logger.stagePop();
} // if
} // _allocateTensorField
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -348,6 +348,8 @@
{ // _initializeInitialStress
if (0 == _dbInitialStress)
return;
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("Materials");
assert(0 != _initialFields);
_initialFields->add("initial stress", "initial_stress");
@@ -477,6 +479,8 @@
// Close databases
_dbInitialStress->close();
+
+ logger.stagePop();
} // _initializeInitialStress
// ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/libsrc/materials/Material.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/Material.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/materials/Material.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -105,7 +105,7 @@
assert(0 != _dbProperties);
assert(0 != quadrature);
ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
- logger.setDebug(2);
+ ///logger.setDebug(2);
logger.stagePush("Materials");
// Get quadrature information
@@ -132,7 +132,6 @@
_properties->newSection(cells, fiberDim);
_properties->allocate();
_properties->zero();
- std::cout << "Initializing material " << _label << ": Created properties" << std::endl;
const ALE::Obj<RealSection>& propertiesSection = _properties->section();
assert(!propertiesSection.isNull());
@@ -169,7 +168,6 @@
_stateVars->allocate();
_stateVars->zero();
} // if
- std::cout << "Initializing material " << _label << ": Created state vars" << std::endl;
const ALE::Obj<RealSection>& stateVarsSection =
(fiberDim > 0) ? _stateVars->section() : 0;
@@ -262,7 +260,7 @@
if (0 != _dbInitialState)
_dbInitialState->close();
logger.stagePop();
- logger.setDebug(0);
+ ///logger.setDebug(0);
} // initialize
// ----------------------------------------------------------------------
@@ -335,7 +333,7 @@
_dimProperties(&propertyScales[0], propertyScales.size());
ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
- logger.setDebug(2);
+ ///logger.setDebug(2);
logger.stagePush("Materials");
// Allocate buffer for property field if necessary.
const ALE::Obj<RealSection>& fieldSection = field->section();
@@ -360,7 +358,7 @@
field->scale(propertyScales[propOffset]);
fieldType = _metadata.fieldType(name, Metadata::PROPERTY);
logger.stagePop();
- logger.setDebug(0);
+ ///logger.setDebug(0);
// Buffer for property at cell's quadrature points
double_array fieldCell(numQuadPts*fiberDim);
@@ -412,7 +410,7 @@
_dimStateVars(&stateVarScales[0], stateVarScales.size());
ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
- logger.setDebug(2);
+ ///logger.setDebug(2);
logger.stagePush("Materials");
// Allocate buffer for state variable field if necessary.
const ALE::Obj<RealSection>& fieldSection = field->section();
@@ -437,7 +435,7 @@
field->label(name);
field->scale(stateVarScales[varOffset]);
logger.stagePop();
- logger.setDebug(0);
+ ///logger.setDebug(0);
// Buffer for state variable at cell's quadrature points
double_array fieldCell(numQuadPts*fiberDim);
Modified: short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -90,6 +90,8 @@
assert(fiberDim * numQuadPts == totalFiberDim);
// Allocate field if necessary
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("Output");
if (0 == _fieldAvg) {
_fieldAvg = new field_type(fieldIn.mesh());
assert(0 != _fieldAvg);
@@ -100,6 +102,7 @@
_fieldAvg->newSection(fieldIn, fiberDim);
_fieldAvg->allocate();
} // else
+ logger.stagePop();
assert(0 != _fieldAvg);
switch (fieldIn.vectorFieldType())
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshBuilder.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshBuilder.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshBuilder.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -180,43 +180,6 @@
logger.stagePop();
logger.stagePop();
-#if defined(ALE_MEM_LOGGING)
- std::cout
- << std::endl
- << "Mesh " << logger.getNumAllocations("Mesh")
- << " allocations " << logger.getAllocationTotal("Mesh")
- << " bytes" << std::endl
-
- << "Mesh " << logger.getNumDeallocations("Mesh")
- << " deallocations " << logger.getDeallocationTotal("Mesh")
- << " bytes" << std::endl
-
- << std::endl
- << "MeshCreation " << logger.getNumAllocations("MeshCreation")
- << " allocations " << logger.getAllocationTotal("MeshCreation")
- << " bytes" << std::endl
-
- << "MeshCreation " << logger.getNumDeallocations("MeshCreation")
- << " deallocations " << logger.getDeallocationTotal("MeshCreation")
- << " bytes" << std::endl
-
- << "MeshStratification " << logger.getNumAllocations("MeshStratification")
- << " allocations " << logger.getAllocationTotal("MeshStratification")
- << " bytes" << std::endl
-
- << "MeshStratification " << logger.getNumDeallocations("MeshStratification")
- << " deallocations " << logger.getDeallocationTotal("MeshStratification")
- << " bytes" << std::endl << std::endl
-
- << "MeshCoordinates " << logger.getNumAllocations("MeshCoordinates")
- << " allocations " << logger.getAllocationTotal("MeshCoordinates")
- << " bytes" << std::endl
-
- << "MeshCoordinates " << logger.getNumDeallocations("MeshCoordinates")
- << " deallocations " << logger.getDeallocationTotal("MeshCoordinates")
- << " bytes" << std::endl << std::endl;
-#endif
-
sieveMesh->getFactory()->clear();
} // buildMesh
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -191,7 +191,7 @@
assert(!sieveMesh.isNull());
ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
- logger.setDebug(2);
+ ///logger.setDebug(2);
logger.stagePush("Materials");
const ALE::Obj<SieveMesh::label_type>& labelMaterials =
sieveMesh->createLabel("material-id");
@@ -234,21 +234,7 @@
#endif
} // if
logger.stagePop();
- logger.setDebug(0);
-
-#if defined(ALE_MEM_LOGGING)
- std::cout
- << "Materials "
- << logger.getNumAllocations("Materials")
- << " allocations " << logger.getAllocationTotal("Materials")
- << " bytes"
- << std::endl
- << "Materials "
- << logger.getNumDeallocations("Materials")
- << " deallocations " << logger.getDeallocationTotal("Materials")
- << " bytes"
- << std::endl;
-#endif
+ ///logger.setDebug(0);
} // _setMaterials
// ----------------------------------------------------------------------
@@ -297,7 +283,6 @@
assert(!sieveMesh.isNull());
ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
- std::cout << "Building Vertex Group " << name << std::endl;
logger.stagePush("VertexGroups");
const ALE::Obj<IntSection>& groupField = sieveMesh->getIntSection(name);
assert(!groupField.isNull());
@@ -317,18 +302,6 @@
} // if/else
sieveMesh->allocate(groupField);
logger.stagePop();
-
-#if defined(ALE_MEM_LOGGING)
- std::cout
- << "VertexGroups " << logger.getNumAllocations("VertexGroups")
- << " allocations " << logger.getAllocationTotal("VertexGroups")
- << " bytes"
- << std::endl
- << "VertexGroups " << logger.getNumDeallocations("VertexGroups")
- << " deallocations " << logger.getDeallocationTotal("VertexGroups")
- << " bytes"
- << std::endl;
-#endif
} // _setGroup
// ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -219,11 +219,15 @@
_fields = new topology::Fields<field_type>(fieldIn.mesh());
if (!_fields->hasField(fieldName.c_str())) {
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("Output");
+
_fields->add(fieldName.c_str(), fieldIn.label());
field_type& fieldOut = _fields->get(fieldName.c_str());
fieldOut.cloneSection(fieldIn);
fieldOut.vectorFieldType(fieldIn.vectorFieldType());
fieldOut.scale(fieldIn.scale());
+ logger.stagePop();
} // if
field_type& fieldOut = _fields->get(fieldName.c_str());
fieldOut.copy(fieldIn);
Modified: short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -73,6 +73,8 @@
const int fiberDimNorm = 1;
// Allocation field if necessary
+ ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+ logger.stagePush("Output");
if (0 == _fieldVecNorm) {
_fieldVecNorm = new field_type(fieldIn.mesh());
_fieldVecNorm->label("vector norm");
@@ -98,6 +100,7 @@
assert(0);
} // switch
} // if
+ logger.stagePop();
const ALE::Obj<RealSection>& sectionNorm =
_fieldVecNorm->section();
Modified: short/3D/PyLith/trunk/libsrc/problems/SolverLinear.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/problems/SolverLinear.cc 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/libsrc/problems/SolverLinear.cc 2009-06-10 00:44:02 UTC (rev 15165)
@@ -21,6 +21,8 @@
#include "pylith/utils/petscerror.h" // USES CHECK_PETSC_ERROR
+#include <petscmesh_solvers.hh> // USES constructFieldSplit()
+
// ----------------------------------------------------------------------
// Constructor
pylith::problems::SolverLinear::SolverLinear(void) :
@@ -66,6 +68,17 @@
err = KSPCreate(fields.mesh().comm(), &_ksp); CHECK_PETSC_ERROR(err);
err = KSPSetInitialGuessNonzero(_ksp, PETSC_FALSE); CHECK_PETSC_ERROR(err);
err = KSPSetFromOptions(_ksp); CHECK_PETSC_ERROR(err);
+
+ const topology::Field<topology::Mesh>& residual = fields.get("residual");
+
+ // Check for fibration
+ if (residual.section()->getNumSpaces() > 0) {
+ PC pc;
+
+ err = KSPGetPC(_ksp, &pc); CHECK_PETSC_ERROR(err);
+ err = PCSetType(pc, PCFIELDSPLIT); CHECK_PETSC_ERROR(err);
+ constructFieldSplit(residual.section(), pc);
+ }
} // initialize
// ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/modulesrc/utils/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/modulesrc/utils/Makefile.am 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/modulesrc/utils/Makefile.am 2009-06-10 00:44:02 UTC (rev 15165)
@@ -53,7 +53,7 @@
_petscmodule_la_LIBADD = \
$(top_builddir)/libsrc/libpylith.la \
-lspatialdata \
- $(PETSC_LIBS)
+ $(PETSC_LIB)
if NO_UNDEFINED
_petscmodule_la_LIBADD += \
$(PYTHON_BLDLIBRARY) $(PYTHON_LIBS) $(PYTHON_SYSLIBS)
@@ -68,7 +68,7 @@
_utilsmodule_la_LIBADD = \
$(top_builddir)/libsrc/libpylith.la \
-lspatialdata \
- $(PETSC_LIBS)
+ $(PETSC_LIB)
if NO_UNDEFINED
_utilsmodule_la_LIBADD += \
$(PYTHON_BLDLIBRARY) $(PYTHON_LIBS) $(PYTHON_SYSLIBS)
Modified: short/3D/PyLith/trunk/pylith/apps/PyLithApp.py
===================================================================
--- short/3D/PyLith/trunk/pylith/apps/PyLithApp.py 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/pylith/apps/PyLithApp.py 2009-06-10 00:44:02 UTC (rev 15165)
@@ -116,7 +116,7 @@
del self.problem
self.compilePerformanceLog()
- self.perfLogger.show()
+ if self.perfLogger.verbose: self.perfLogger.show()
return
Modified: short/3D/PyLith/trunk/pylith/perf/MemoryLogger.py
===================================================================
--- short/3D/PyLith/trunk/pylith/perf/MemoryLogger.py 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/pylith/perf/MemoryLogger.py 2009-06-10 00:44:02 UTC (rev 15165)
@@ -91,7 +91,6 @@
if not stage in self.memory: self.memory[stage] = {}
materialModel = pylith.perf.Material.Material(material.label(), material.ncells)
materialModel.tabulate(self.memory[stage])
- print 'Material:',material.label()
self.logField(stage, material.propertiesField())
self.logField(stage, material.stateVarsField())
if self.verbose: self.show()
@@ -117,7 +116,6 @@
import pylith.perf.Field
if not stage in self.memory: self.memory[stage] = {}
- print ' Field:',field.label(), field.sectionSize(), field.chartSize()
fieldModel = pylith.perf.Field.Field(field.label(), field.sectionSize(), field.chartSize())
fieldModel.tabulate(self.memory[stage])
if self.verbose: self.show()
Modified: short/3D/PyLith/trunk/pylith/problems/Formulation.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Formulation.py 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/pylith/problems/Formulation.py 2009-06-10 00:44:02 UTC (rev 15165)
@@ -216,6 +216,10 @@
# Setup fields
self._info.log("Creating solution field.")
+ from pylith.utils.petsc import MemoryLogger
+ logger = MemoryLogger.singleton()
+ #logger.setDebug(1)
+ logger.stagePush("Problem")
self.fields.add("dispIncr(t->t+dt)", "displacement_increment")
self.fields.add("disp(t)", "displacement")
self.fields.add("residual", "residual")
@@ -246,6 +250,8 @@
residual.vectorFieldType(residual.VECTOR)
residual.scale(lengthScale.value)
+ logger.stagePop()
+ logger.setDebug(0)
self._debug.log(resourceUsageString())
self._logger.eventEnd(logEvent)
@@ -333,8 +339,6 @@
for name in self.fields.fieldNames():
field = self.fields.get(name)
self.perfLogger.logField('Problem', field)
- # For debugging right now
- self.perfLogger.logField('Field', field)
for integrator in self.integratorsMesh + self.integratorsSubMesh:
self.perfLogger.logQuadrature('Quadrature', integrator.quadrature())
Modified: short/3D/PyLith/trunk/pylith/problems/Implicit.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Implicit.py 2009-06-09 23:47:35 UTC (rev 15164)
+++ short/3D/PyLith/trunk/pylith/problems/Implicit.py 2009-06-10 00:44:02 UTC (rev 15165)
@@ -90,6 +90,11 @@
# Allocate other fields, reusing layout from dispIncr
self._info.log("Creating other fields.")
+ self._info.log("Creating solution field.")
+ from pylith.utils.petsc import MemoryLogger
+ logger = MemoryLogger.singleton()
+ #logger.setDebug(1)
+ logger.stagePush("Problem")
self.fields.copyLayout("dispIncr(t->t+dt)")
# Setup fields and set to zero
@@ -117,6 +122,8 @@
for integrator in self.integratorsMesh + self.integratorsSubMesh:
integrator.useSolnIncr(False)
+ logger.stagePop()
+ logger.setDebug(0)
return
More information about the CIG-COMMITS
mailing list