Potential KDTree memory leak
Hi all, the memory increases at each iteration of the following program: from numpy import ndarray from scipy.spatial import KDTree class C(ndarray): pass pts = [C((2,)) for i in range(1000)] for i in xrange(10000): tree = KDTree(pts) It does not occur when using the base class ndarray instead. I've only tested on a windows machine. Any idea what happens? Of course this is a dummy program tailored to emphasis the problem. But as I'm using KDTree intensively in my application (both creation and query) and I need to fix this memory leak. Any help is greatly appreciated, ~Pierre
On Thu, Mar 11, 2010 at 07:19, Pierre Lamon <pierre.lamon@bluebotics.com> wrote:
Hi all,
the memory increases at each iteration of the following program:
from numpy import ndarray from scipy.spatial import KDTree
class C(ndarray): pass
pts = [C((2,)) for i in range(1000)] for i in xrange(10000): tree = KDTree(pts)
It does not occur when using the base class ndarray instead. I've only tested on a windows machine. Any idea what happens?
With recent SVN versions of numpy and scipy, I do not see a leak. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
On 2010-03-11 16:50, Robert Kern wrote:
With recent SVN versions of numpy and scipy, I do not see a leak.
I've tested with compiled sources of numpy 1.3.0 and scipy 0.7.3 and there is the leak (test done under linux). On the other hand there is no leak with the SVN version of numpy and scipy. I'm glad the bug has been fixed. Any idea when the new release will be available ? -- Dr. Pierre Lamon Research& Development / Scientific Manager BlueBotics SA PSE-C, CH-1015 Lausanne, Switzerland http://www.bluebotics.com pierre.lamon@bluebotics.com +41 21 693 83 14 (tel) +41 21 693 83 15 (fax)
On Mon, Mar 15, 2010 at 4:39 PM, Pierre Lamon <pierre.lamon@bluebotics.com>wrote:
On 2010-03-11 16:50, Robert Kern wrote:
With recent SVN versions of numpy and scipy, I do not see a leak.
I've tested with compiled sources of numpy 1.3.0 and scipy 0.7.3 and there is the leak (test done under linux).
Scipy 0.7.3, that's impressive:) 0.7.2 RC1 should be coming soon.
On the other hand there is no leak with the SVN version of numpy and scipy. I'm glad the bug has been fixed. Any idea when the new release will be available ?
The new release of scipy trunk (0.8.0)? Probably you have to be a bit patient there. The plan is ATM: first scipy 0.7.2, then numpy 1.4.1, then numpy 2.0, and only then scipy 0.8.0. Cheers, Ralf
On 2010-03-15 16:03, Ralf Gommers wrote:
On Mon, Mar 15, 2010 at 4:39 PM, Pierre Lamon <pierre.lamon@bluebotics.com <mailto:pierre.lamon@bluebotics.com>> wrote:
On 2010-03-11 16:50, Robert Kern wrote: > With recent SVN versions of numpy and scipy, I do not see a leak. > I've tested with compiled sources of numpy 1.3.0 and scipy 0.7.3 and there is the leak (test done under linux).
Scipy 0.7.3, that's impressive:) 0.7.2 RC1 should be coming soon.
Sorry for the typo. It was version 0.7.1 of Scipy
On the other hand there is no leak with the SVN version of numpy and scipy. I'm glad the bug has been fixed. Any idea when the new release will be available ?
The new release of scipy trunk (0.8.0)? Probably you have to be a bit patient there. The plan is ATM: first scipy 0.7.2, then numpy 1.4.1, then numpy 2.0, and only then scipy 0.8.0.
Thanks for giving me the schedule. I'll work with the SVN version meanwhile. Cheers, ~Pierre
Cheers, Ralf
_______________________________________________ SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
-- Dr. Pierre Lamon Research& Development / Scientific Manager BlueBotics SA PSE-C, CH-1015 Lausanne, Switzerland http://www.bluebotics.com pierre.lamon@bluebotics.com +41 21 693 83 14 (tel) +41 21 693 83 15 (fax)
participants (3)
-
Pierre Lamon
-
Ralf Gommers
-
Robert Kern