#1047 memory leaks in AMG
Metadata
| Property | Value |
|---|---|
| Reported by | Ansgar Burchardt (burchardt@igpm.rwth-aachen.de) |
| Reported at | Mar 7, 2012 14:45 |
| Type | Bug Report |
| Version | Git (pre2.4) [autotools] |
| Operating System | Unspecified / All |
| Last edited by | Oliver Sander (oliver.sander@tu-dresden.de) |
| Last edited at | May 14, 2012 16:13 |
| Closed by | Oliver Sander (oliver.sander@tu-dresden.de) |
| Closed at | May 14, 2012 16:13 |
| Closed in version | Unknown |
| Resolution | Fixed |
| Comment | In revision 1581 in the trunk, and revision 1582 in the 2.2 release branch. |
Description
There seem to be memory leaks in ISTL's AMG solver in dune/istl/paamg/hierarchy.hh (SVN rev. 1538). I managed to find these with valgrind so far, but I am not sure where they are supposed to be freed:
-
line 728: mlevel.addRedistributed(ConstructionTraits::construct(args)); 4 timesteps: 1,286 kB in 6 blocks lost 8 timesteps: 3,086 kB in 10 blocks lost
-
line 611: redistributeMatrix(const_cast<M&>(origMatrix), newMatrix, origComm, *newComm, ri); calls matrixredistribute.hh:828, matrixredistribute.hh:728, matrixredistribute.hh:300, bcrsmatrix.hh:567, bcrsmatrix.hh:1472 4 timesteps: 770 kB in 3 blocks lost 8 timesteps: 256 kB in 1 block lost I'm not sure what to think about it leaking less memory when I do more timesteps.
-
line 1114: hierarchy.addRedistributedOnCoarsest(new BlockVector<V,TA>(matrix.getRedistributed().getmat().N())); 4 timesteps: 3x 120 kB in 3 blocks lost 8 timesteps: 3x 200 kB in 3 blocks lost Three times as the method is called for three vectors in amg.hh lines 388-390.
I observed all of these in the rank=0-process of my total 3 MPI processes.
I have attached the relevant part of the valgrind --leak-check=full output for both 4 and 8 steps.
Ansgar