[Numpy-discussion] Memory leak with numpy master
Mon Sep 24 13:17:16 CDT 2012
with numpy '1.6.1', I have no problem.
With numpy 1.7.0b2, I can reproduce the problem.
On Mon, Sep 24, 2012 at 1:04 PM, Gael Varoquaux
> Hi list,
> I think that I am hit a memory leak with numpy master. The following code
> enables to reproduce it:
> import numpy as np
> n = 100
> m = np.eye(n)
> for i in range(30000):
> t, result_t = np.linalg.linalg._commonType(m)
> a = np.linalg.linalg._fastCopyAndTranspose(t, m)
> pivots = np.zeros((n,), np.linalg.linalg.fortran_int)
> results = np.linalg.lapack_lite.dgetrf(n, n, a, n, pivots, 0)
> d = np.diagonal(a)
> if not i % 1000:
> print i
> If you execute this code, you'll see the memory go steadily up.
> The reason that I came up with such a strange looking code is that in my
> codebase, I do repeated calls to np.linalg.slogdet. I came up with the
> code above by simplifying what is done in slogdet. I don't think that I
> can simplify any further and still reproduce the memory leak.
> Should I submit a bug report (in other words, can people reproduce?)?
> NumPy-Discussion mailing list
More information about the NumPy-Discussion