dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #17442
Re: [Bug 518241] Re: pydolfin-memory-leaks
On Sun, Feb 07, 2010 at 09:28:00AM -0000, Garth Wells wrote:
> Change doesn't seem to help. Memory use still increases for the first
> test case in the bug report.
ok, then it must be something else. I'll look into it later.
--
Anders
--
pydolfin-memory-leaks
https://bugs.launchpad.net/bugs/518241
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
Status in DOLFIN: Confirmed
Bug description:
There seem to be some nasty memory leaks in the Python interface. Some are bad enough that my solver crashes.
1. (see https://lists.launchpad.net/dolfin/msg00790.html)
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
2. The below problems leaks badly
class MyNonlinearProblem(NonlinearProblem):
def __init__(self, a, L, ffc_parameters):
NonlinearProblem.__init__(self)
self.L = L
self.a = a
self.reset_sparsity = True
self.ffc_parameters = ffc_parameters
def F(self, b, x):
return
def J(self, A, x):
return
for i in xrange(10):
# Create forms,
# Create MyNonlinearProblem
# Create NewtonSolver (modified to do nothing except call NewtonSolver::form, which does nothing)
# Call solve
It does not leak if I have
class MyNonlinearProblem(NonlinearProblem):
def __init__(self, a, L, ffc_parameters):
NonlinearProblem.__init__(self)
self.reset_sparsity = True
self.ffc_parameters = ffc_parameters
def F(self, b, x):
return
def J(self, A, x):
return
References