[SciPy-User] fftpack problem

josef.pktd@gmai... josef.pktd@gmai...
Thu Dec 17 09:58:30 CST 2009


On Thu, Dec 17, 2009 at 10:35 AM, Charles R Harris
<charlesr.harris@gmail.com> wrote:
>
>
> 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.

Isn't there a warning somewhere that fft is caching? I cannot find it
anymore. (or maybe it's for something else)

Josef

>
> Chuck
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>


More information about the SciPy-User mailing list