← Back to team overview

dolfin team mailing list archive

Re: [Bug 521957] Re: Memory leaks in Python interface

 

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.

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
>

-- 
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.





Follow ups

References