← Back to team overview

dolfin team mailing list archive

Re: memory leaks

 

Hello!

Looks like the below code leaks due to ffc.jit._form_data_cache is filling up. 
Not sure how the logic works for caching of form data, and can therefore not 
suggest any fix.

I also suggest renaming jit.py to jit_something.py so one can examine this 
module during runtime. It is now shadowed by the jit function.

Johan

On Saturday 06 February 2010 13:42:19 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)
> 
> 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
> 



Follow ups

References