← Back to team overview

dolfin team mailing list archive

Re: memory leaks

 


Johan Hake wrote:
> On Saturday 06 February 2010 14:01:23 Anders Logg wrote:
>> On Sat, Feb 06, 2010 at 09:42:19PM +0000, Garth N. Wells wrote:
>>> I'm trying to track down a nasty memory leak in a solver, and I've
>>> noticed an increase in memory use for the below code, which I didn't
>>> expect. It's not significant enough to explain the problems that I have,
>>> but I did expect that the below code should not leads to any increase in
>>> memory use. From a quick look, the memory use appears to come from
>>>
>>>     # JIT-compile element to get ufc_element and ufc_dofmap
>>>     ufc_element, ufc_dofmap = jit(self._ufl_element)
>> It might be related to caching of form data but it shouldn't since
>> that cache is explicitly turned off when compiling single elements.
>>
>> Can you try printing the size of _form_data_cache inside jit.py in
>> FFC?
> 
> Already did and it is this that leaks.
>

I've moved this and more leak problems to a bug report,

  https://bugs.launchpad.net/dolfin/+bug/518241

It's very severe.

Garth


> Johan
> 
>> --
>> Anders
>>
>>> Should this be expected?
>>>
>>> Garth
>>>
>>>
>>> from dolfin import *
>>>
>>> mesh = UnitSquare(2, 2, "crossed")
>>>
>>> for i in xrange(5):
>>>     for j in xrange(500):
>>>         BDM = FunctionSpace(mesh, "Brezzi-Douglas-Marini", 1)
>>>     raw_input("Check memory use and press ENTER to continue")
>>>     print ". . . .", i
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dolfin
>>> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dolfin
>>> More help   : https://help.launchpad.net/ListHelp





References