[SciPy-User] fftpack problem

Charles R Harris charlesr.harris@gmail....
Thu Dec 17 09:35:06 CST 2009


On Thu, Dec 17, 2009 at 8:23 AM, Ranjit Chacko <rjchacko@gmail.com> wrote:

> Hi,
>
> I have a loop in my program which repeatedly calls ifft2 and fft2 in order
> to do a convolution. After many iterations the program crashed because of a
> memory error. Is there a memory leak in these functions?
>
> Python(8811) malloc: *** mmap(size=4194304) failed (error code=12)
> *** error: can't allocate region
> *** set a breakpoint in malloc_error_break to debug
> Traceback (most recent call last):
>   File "/Users/rjchacko/Python/pythonsims/src/gagne.py", line 92, in
> <module>
>     nonLocalTerm = ifft2(fft2(phi) * Ktilde)
>   File
> "/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/scipy/fftpack/basic.py",
> line 415, in ifft2
>     return ifftn(x,shape,axes,overwrite_x)
>   File
> "/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/scipy/fftpack/basic.py",
> line 393, in ifftn
>     return _raw_fftnd(tmp,shape,axes,-1,overwrite_x,work_function)
>   File
> "/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/scipy/fftpack/basic.py",
> line 312, in _raw_fftnd
>     x = _fix_shape(x, s[i], waxes[i])
>   File
> "/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/scipy/fftpack/basic.py",
> line 38, in _fix_shape
>     z = zeros(s,x.dtype.char)
> MemoryError
>
>
Maybe. But we need a code sample that reproduces the problem to track it
down.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20091217/603cfffd/attachment-0001.html 


More information about the SciPy-User mailing list