dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #17546
Leak in Python interface
I've tracked a leak in the Python interface down to the line:
# Initialize base class
cpp.Form.__init__(self, self._compiled_form, self.function_spaces,
self.coefficients)
on line 46 of form.py. If I do
cpp.Form.__init__(self, self._compiled_form, self.function_spaces, [])
then there is no observable leak. Any ideas? I checked dolfin::Form it
it looks ok. I even commented out all code in the dolfin::Form
constructor to be sure.
Below is the script that I've been testing with.
Garth
from dolfin import *
parameters["form_compiler"]["cpp_optimize"] = True
parameters["form_compiler"]["optimize"] = True
mesh = UnitSquare(16, 16)
for t in xrange(20000):
for level in xrange(100):
V = FunctionSpace(mesh, "CG", 1)
v = TestFunction(V)
u = Function(V)
u0 = Function(V)
L = v*(u-u0)*dx
b = assemble(L)
print "----"
Follow ups