[cig-commits] r19737 - short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems
brad at geodynamics.org
brad at geodynamics.org
Wed Mar 7 12:33:18 PST 2012
Author: brad
Date: 2012-03-07 12:33:18 -0800 (Wed, 07 Mar 2012)
New Revision: 19737
Modified:
short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverLinear.cc
Log:
TEMPORARY: Added some PETSc debugging stuff to isolate memory deallocation issue.
Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverLinear.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverLinear.cc 2012-03-07 20:32:26 UTC (rev 19736)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverLinear.cc 2012-03-07 20:33:18 UTC (rev 19737)
@@ -54,6 +54,7 @@
{ // deallocate
Solver::deallocate();
+ std::cout << "Destroying KSP." << std::endl;
PetscErrorCode err = KSPDestroy(&_ksp);CHECK_PETSC_ERROR(err);
} // deallocate
@@ -91,15 +92,17 @@
topology::Jacobian* jacobian,
const topology::Field<topology::Mesh>& residual)
{ // solve
- assert(0 != solution);
- assert(0 != jacobian);
- assert(0 != _formulation);
+ assert(solution);
+ assert(jacobian);
+ assert(_formulation);
const int setupEvent = _logger->eventId("SoLi setup");
const int solveEvent = _logger->eventId("SoLi solve");
const int scatterEvent = _logger->eventId("SoLi scatter");
_logger->eventBegin(scatterEvent);
+ PetscFunctionBegin;
+
// Update PetscVector view of field.
residual.scatterSectionToVector();
@@ -164,6 +167,8 @@
// Update rate fields to be consistent with current solution.
_formulation->calcRateFields();
+
+ PetscFunctionReturnVoid();
} // solve
// ----------------------------------------------------------------------
More information about the CIG-COMMITS
mailing list