dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #17647
[Bug 521957] Re: Memory leaks in Python interface
On Tuesday 16 February 2010 02:52:43 Garth Wells wrote:
> Johan Hake wrote:
> > On Monday 15 February 2010 11:54:10 Garth Wells wrote:
> >> Johan Hake wrote:
> >>> On Monday 15 February 2010 11:00:48 Garth Wells wrote:
> >>>> There is a leak small in the LU solver MUMPS which is used via PETSc.
> >>>> I have changed the code to use UMFPACK as the default LU solver on a
> >>>> single process.
> >>>
> >>> So the leak is not in the Python interface?
> >>
> >> No.
> >
> > Cool, so the resent Python leak galore has come to an end?
> >
> > I submitted a bug report to SWIG concerning the vtable bug. Good work of
> > finding this one Garth.
>
> Do you have a link to the bug report? It would be nice to know if/when
> it's fixed.
<https://sourceforge.net/tracker/index.php?func=detail&aid=2952874&group_id=1645&atid=101645>
Not sure there are an easy fix though. vtables is increasing the speed of
finding the correct callback method. It will speed up the time wrt to ordinary
Python lookup time, but it will still be way slower than a pure C++ compiled
class.
Johan
> Garth
>
> > I further tracked it down to a circular reference holding. The vtable
> > cached Python method stores a reference to the original instance. When
> > the instance gets out of scope it keeps a reference to itself in the
> > cached method, so it never gets destroyed.
> >
> > Johan
> >
> >>> Was it reproducible in C++?
> >>
> >> Probably, but I didn't try. A problem with openmpi is that it spews out
> >> tonnes of valgrind messages which makes it hard to detect leaks when
> >> using PETSc (since I have PETSc compiled with MPI). I did test the C++
> >> with uBLAS using valgrind before sorting out a few of the Python leaks,
> >> and it didn't report any leaks.
> >>
> >> Garth
> >>
> >>> Johan
>
** Bug watch added: SourceForge.net Tracker #2952874
http://sourceforge.net/support/tracker.php?aid=2952874
--
Memory leaks in Python interface
https://bugs.launchpad.net/bugs/521957
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
Status in DOLFIN: Fix Committed
Bug description:
There appear to be some small leaks in the Python interface. It could be related to FFC and/or Instant caching. Some test cases have been placed in
lp:~dolfin-core/dolfin/sandbox
in the 'memest' directory. These tests, and any new memory tests, should pass before a new release is made.
References