[SciPy-User] fftpack problem

Ranjit Chacko rjchacko at gmail.com
Fri Dec 18 10:50:54 EST 2009


The problem was with matplotlib not fftpack. The memory error just happened
to occur during the call to ifft.

Thanks,

-Ranjit

On Thu, Dec 17, 2009 at 10:35 AM, Charles R Harris <
charlesr.harris at gmail.com> wrote:

>
>
> On Thu, Dec 17, 2009 at 8:23 AM, Ranjit Chacko <rjchacko at 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/20091218/78dfa1fe/attachment.html>


More information about the SciPy-User mailing list