From 6e24b075411e8f02d464e0b2bfab25c085148ba1 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Sun, 9 Feb 2014 19:21:02 +0000 Subject: [PATCH] Also free vector memory from deal.II's own parallel vectors. git-svn-id: https://svn.dealii.org/trunk@32440 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/base/mpi.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/deal.II/source/base/mpi.cc b/deal.II/source/base/mpi.cc index 97a7c89b66..df1d360393 100644 --- a/deal.II/source/base/mpi.cc +++ b/deal.II/source/base/mpi.cc @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #include @@ -401,8 +403,18 @@ namespace Utilities // to errors #ifdef DEAL_II_WITH_MPI - // Start with Trilinos (need to do this before finalizing PETSc because it finalizes MPI. - // Delete vectors from the pools: + // Start with the deal.II MPI vectors (need to do this before finalizing + // PETSc because it finalizes MPI). Delete vectors from the pools: + GrowingVectorMemory > + ::release_unused_memory (); + GrowingVectorMemory > + ::release_unused_memory (); + GrowingVectorMemory > + ::release_unused_memory (); + GrowingVectorMemory > + ::release_unused_memory (); + + // Next with Trilinos: # if defined(DEAL_II_WITH_TRILINOS) GrowingVectorMemory ::release_unused_memory (); -- 2.39.5