Memory leak in signal.convolve2d? Alternative?
Hi, I just reported a memory leak with matrices, and I might have found another (unrelated) one in the convolve2d function: import scipy.signal from numpy import ones while True: scipy.signal.convolve2d(ones((1,1)), ones((1,1))) Is there an alternative implementation of a 2d convolution? On the long run I'd be interested in using GPU acceleration, but for now I'd just like to get my code to run without running out of memory... Cheers! David The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
On Tue, Mar 9, 2010 at 13:49, David Reichert <d.p.reichert@sms.ed.ac.uk> wrote:
Hi,
I just reported a memory leak with matrices, and I might have found another (unrelated) one in the convolve2d function:
import scipy.signal from numpy import ones
while True: scipy.signal.convolve2d(ones((1,1)), ones((1,1)))
This does not leak for me using SVN versions of numpy and scipy. I recommend upgrading. -- 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
Hm, upgrading scipy from 0.7.0 to 0.7.1 didn't do the trick for me (still running numpy 1.3.0). I'm not sure if I feel confident enough to use developer versions, but I'll look into it. Cheers David On Tue, Mar 9, 2010 at 7:57 PM, Robert Kern <robert.kern@gmail.com> wrote:
On Tue, Mar 9, 2010 at 13:49, David Reichert <d.p.reichert@sms.ed.ac.uk> wrote:
Hi,
I just reported a memory leak with matrices, and I might have found another (unrelated) one in the convolve2d function:
import scipy.signal from numpy import ones
while True: scipy.signal.convolve2d(ones((1,1)), ones((1,1)))
This does not leak for me using SVN versions of numpy and scipy. I recommend upgrading.
-- 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 _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
On Tue, Mar 9, 2010 at 4:24 PM, David Reichert <d.p.reichert@sms.ed.ac.uk> wrote:
Hm, upgrading scipy from 0.7.0 to 0.7.1 didn't do the trick for me (still running numpy 1.3.0). I'm not sure if I feel confident enough to use developer versions, but I'll look into it.
If you don't need the extra options, you could also use in the meantime the nd version signal.convolve or the fft version signal.fftconvolve Josef
Cheers
David
On Tue, Mar 9, 2010 at 7:57 PM, Robert Kern <robert.kern@gmail.com> wrote:
On Tue, Mar 9, 2010 at 13:49, David Reichert <d.p.reichert@sms.ed.ac.uk> wrote:
Hi,
I just reported a memory leak with matrices, and I might have found another (unrelated) one in the convolve2d function:
import scipy.signal from numpy import ones
while True: scipy.signal.convolve2d(ones((1,1)), ones((1,1)))
This does not leak for me using SVN versions of numpy and scipy. I recommend upgrading.
-- 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 _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Hi, Just another update: signal.convolve and signal.fftconvolve indeed do not seem to have the problem, however, they are slower by at least a factor of 2 for my situation. Moreover, I also tried out the numpy 1.4.x branch and the latest scipy svn, and a short test seemed to indicate that the memory leak still was present (albeit, interestingly, memory usage grew much slower), but then something else stopped working in my main program, so I converted back to scipy 7.1 and numpy 1.3.0 for now. I might have confused things somewhere along the line, though, I'm not an expert with these things. Maybe other people can confirm the problem one way or another. Thanks, David On Tue, Mar 9, 2010 at 9:32 PM, <josef.pktd@gmail.com> wrote:
On Tue, Mar 9, 2010 at 4:24 PM, David Reichert <d.p.reichert@sms.ed.ac.uk> wrote:
Hm, upgrading scipy from 0.7.0 to 0.7.1 didn't do the trick for me (still running numpy 1.3.0). I'm not sure if I feel confident enough to use developer versions, but I'll look into it.
If you don't need the extra options, you could also use in the meantime the nd version signal.convolve or the fft version signal.fftconvolve
Josef
Cheers
David
On Tue, Mar 9, 2010 at 7:57 PM, Robert Kern <robert.kern@gmail.com>
wrote:
On Tue, Mar 9, 2010 at 13:49, David Reichert <d.p.reichert@sms.ed.ac.uk
wrote:
Hi,
I just reported a memory leak with matrices, and I might have found another (unrelated) one in the convolve2d function:
import scipy.signal from numpy import ones
while True: scipy.signal.convolve2d(ones((1,1)), ones((1,1)))
This does not leak for me using SVN versions of numpy and scipy. I recommend upgrading.
-- 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 _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
On Tue, Mar 9, 2010 at 7:13 PM, David Reichert <d.p.reichert@sms.ed.ac.uk> wrote:
Hi,
Just another update:
signal.convolve and signal.fftconvolve indeed do not seem to have the problem, however, they are slower by at least a factor of 2 for my situation.
Moreover, I also tried out the numpy 1.4.x branch and the latest scipy svn, and a short test seemed to indicate that the memory leak still was present (albeit, interestingly, memory usage grew much slower), but then something else stopped working in my main program, so I converted back to scipy 7.1 and numpy 1.3.0 for now.
I might have confused things somewhere along the line, though, I'm not an expert with these things. Maybe other people can confirm the problem one way or another.
I ran your convolve2d example for a few minutes without any increase in memory with numpy 1.4.0 and scipy svn that is about 2 months old Josef
Thanks,
David
On Tue, Mar 9, 2010 at 9:32 PM, <josef.pktd@gmail.com> wrote:
On Tue, Mar 9, 2010 at 4:24 PM, David Reichert <d.p.reichert@sms.ed.ac.uk> wrote:
Hm, upgrading scipy from 0.7.0 to 0.7.1 didn't do the trick for me (still running numpy 1.3.0). I'm not sure if I feel confident enough to use developer versions, but I'll look into it.
If you don't need the extra options, you could also use in the meantime the nd version signal.convolve or the fft version signal.fftconvolve
Josef
Cheers
David
On Tue, Mar 9, 2010 at 7:57 PM, Robert Kern <robert.kern@gmail.com> wrote:
On Tue, Mar 9, 2010 at 13:49, David Reichert <d.p.reichert@sms.ed.ac.uk> wrote:
Hi,
I just reported a memory leak with matrices, and I might have found another (unrelated) one in the convolve2d function:
import scipy.signal from numpy import ones
while True: scipy.signal.convolve2d(ones((1,1)), ones((1,1)))
This does not leak for me using SVN versions of numpy and scipy. I recommend upgrading.
-- 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 _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
participants (3)
-
David Reichert -
josef.pktd@gmail.com -
Robert Kern