[SciPy-user] fftpack test failures

Paul Ray Paul.Ray at nrl.navy.mil
Tue Jan 24 11:51:33 CST 2006


Hi,

Since I just did an svn update for numpy and scipy to fix the stats  
bug, so I did a scipy.test(10), and found there are now test failures  
in fftpack:

In [12]: scipy.fftpack.test(10)
   Found 24 tests for scipy.fftpack.pseudo_diffs
   Found 23 tests for scipy.fftpack.basic
   Found 4 tests for scipy.fftpack.helper
   Found 0 tests for __main__

Differentiation of periodic functions
=====================================
size  |  convolve |    naive
-------------------------------------
    100 |      0.08 |      1.61  (secs for 1500 calls)
   1000 |      0.07 |      1.94  (secs for 300 calls)
    256 |      0.11 |      2.50  (secs for 1500 calls)
    512 |      0.13 |      2.71  (secs for 1000 calls)
   1024 |      0.09 |      3.10  (secs for 500 calls)
   2048 |      0.11 |      2.57  (secs for 200 calls)
   4096 |      0.12 |      2.68  (secs for 100 calls)
   8192 |      0.20 |      2.82..........  (secs for 50 calls)

Hilbert transform of periodic functions
=========================================
size  | optimized |    naive
-----------------------------------------
    100 |      0.08 |      1.37  (secs for 1500 calls)
   1000 |      0.07 |      1.19  (secs for 300 calls)
    256 |      0.10 |      1.66  (secs for 1500 calls)
    512 |      0.11 |      1.70  (secs for 1000 calls)
   1024 |      0.09 |      1.86  (secs for 500 calls)
   2048 |      0.11 |      1.47  (secs for 200 calls)
   4096 |      0.11 |      1.38  (secs for 100 calls)
   8192 |      0.12 |      1.38........  (secs for 50 calls)

Shifting periodic functions
==============================
size  | optimized |    naive
------------------------------
    100 |      0.08 |      1.35  (secs for 1500 calls)
   1000 |      0.06 |      1.59  (secs for 300 calls)
    256 |      0.11 |      2.03  (secs for 1500 calls)
    512 |      0.11 |      2.14  (secs for 1000 calls)
   1024 |      0.10 |      2.57  (secs for 500 calls)
   2048 |      0.10 |      1.87  (secs for 200 calls)
   4096 |      0.10 |      1.76  (secs for 100 calls)
   8192 |      0.13 |      1.77..  (secs for 50 calls)

Tilbert transform of periodic functions
=========================================
size  | optimized |    naive
-----------------------------------------
    100 |      0.08 |      1.52  (secs for 1500 calls)
   1000 |      0.05 |      1.42  (secs for 300 calls)
    256 |      0.11 |      2.18  (secs for 1500 calls)
    512 |      0.11 |      2.21  (secs for 1000 calls)
   1024 |      0.09 |      3.00  (secs for 500 calls)
   2048 |      0.20 |      2.78  (secs for 200 calls)
   4096 |      0.15 |      2.57  (secs for 100 calls)
   8192 |      0.12 |      1.72....  (secs for 50 calls)

                  Fast Fourier Transform
=================================================
       |    real input     |   complex input
-------------------------------------------------
size |  scipy  | Numeric |  scipy  | Numeric
-------------------------------------------------
   100 |    0.28 |    0.31 |    2.43 |    0.32  (secs for 7000 calls)
1000 |    0.50 |    0.76 |    3.32 |    0.82  (secs for 2000 calls)
   256 |    0.68 |    0.65 |    4.76 |    0.63  (secs for 10000 calls)
   512 |    0.92 |    1.35 |    8.03 |    1.27  (secs for 10000 calls)
1024 |    0.30 |    0.40 |    1.38 |    0.41  (secs for 1000 calls)
2048 |    0.62 |    0.82 |    2.56 |    0.76  (secs for 1000 calls)
4096 |    0.56 |    0.75 |    2.43 |    0.77  (secs for 500 calls)
8192 |    1.25 |    2.03 |   11.35 |    4.08...confused: size=2,  
arr_size=8, rank=1, effrank=2, arr.nd=2, dims=[ 2 ], arr.dims=[ 2 4 ]
E  (secs for 500 calls)

     Multi-dimensional Fast Fourier Transform
===================================================
           |    real input     |   complex input
---------------------------------------------------
    size   |  scipy  | Numeric |  scipy  |  Numeric
---------------------------------------------------
   100x100confused: size=100, arr_size=10000, rank=1, effrank=2,  
arr.nd=2, dims=[ 100 ], arr.dims=[ 100 100 ]
Econfused: size=3, arr_size=27, rank=1, effrank=3, arr.nd=3, dims= 
[ 3 ], arr.dims=[ 3 3 3 ]
Econfused: size=3, arr_size=9, rank=1, effrank=2, arr.nd=2, dims= 
[ 3 ], arr.dims=[ 3 3 ]
Econfused: size=4, arr_size=16, rank=1, effrank=2, arr.nd=2, dims= 
[ 4 ], arr.dims=[ 4 4 ]
Econfused: size=4, arr_size=16, rank=1, effrank=2, arr.nd=2, dims= 
[ 4 ], arr.dims=[ 4 4 ]
E
        Inverse Fast Fourier Transform
===============================================
       |     real input    |    complex input
-----------------------------------------------
size |  scipy  | Numeric |  scipy  | Numeric
-----------------------------------------------
   100 |    0.70 |    1.46 |    4.39 |    1.09  (secs for 7000 calls)
1000 |    0.57 |    2.31 |    3.40 |    2.36  (secs for 2000 calls)
   256 |    0.66 |    2.27 |    5.91 |    2.58  (secs for 10000 calls)
   512 |    1.09 |    4.78 |    7.63 |    4.10  (secs for 10000 calls)
1024 |    0.38 |    1.74 |    2.40 |    1.23  (secs for 1000 calls)
2048 |    0.65 |    3.74 |    3.25 |    2.11  (secs for 1000 calls)
4096 |    0.64 |    2.22 |    2.60 |    2.00  (secs for 500 calls)
8192 |    1.34 |    4.77 |    6.15 |    7.22.....confused: size=3,  
arr_size=9, rank=1, effrank=2, arr.nd=2, dims=[ 3 ], arr.dims=[ 3 3 ]
Econfused: size=2, arr_size=4, rank=1, effrank=2, arr.nd=2, dims= 
[ 2 ], arr.dims=[ 2 2 ]
E  (secs for 500 calls)

Inverse Fast Fourier Transform (real data)
==================================
size |  scipy  | Numeric
----------------------------------
   100 |    0.57 |    1.33  (secs for 7000 calls)
1000 |    0.28 |    1.46  (secs for 2000 calls)
   256 |    0.75 |    1.96  (secs for 10000 calls)
   512 |    0.81 |    1.96  (secs for 10000 calls)
1024 |    0.13 |    0.51  (secs for 1000 calls)
2048 |    0.62 |    2.14  (secs for 1000 calls)
4096 |    0.71 |    1.15  (secs for 500 calls)
8192 |    1.31 |    2.52....  (secs for 500 calls)

Fast Fourier Transform (real data)
==================================
size |  scipy  | Numeric
----------------------------------
   100 |    0.40 |    0.38  (secs for 7000 calls)
1000 |    0.24 |    0.31  (secs for 2000 calls)
   256 |    0.60 |    0.65  (secs for 10000 calls)
   512 |    0.87 |    0.94  (secs for 10000 calls)
1024 |    0.12 |    0.14  (secs for 1000 calls)
2048 |    0.55 |    0.60  (secs for 1000 calls)
4096 |    0.51 |    0.52  (secs for 500 calls)
8192 |    0.96 |    1.09.......
======================================================================
ERROR: check_n_argument_real (scipy.fftpack.basic.test_basic.test_fft)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 105, in check_n_argument_real
     y = fft([x1,x2],n=4)
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 101, in fft
     return work_function(tmp,n,1,0,overwrite_x)
error: failed in converting 1st argument `x' of _fftpack.zrfft to C/ 
Fortran array

======================================================================
ERROR: bench_random (scipy.fftpack.basic.test_basic.test_fftn)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 571, in bench_random
     y = fftn(x)
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 302, in fftn
     return _raw_fftnd(tmp,shape,axes,1,overwrite_x,work_function)
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 238, in _raw_fftnd
     return work_function(x,s,direction,overwrite_x=overwrite_x)
error: failed in converting 1st argument `x' of _fftpack.zfftnd to C/ 
Fortran array

======================================================================
ERROR: check_axes_argument (scipy.fftpack.basic.test_basic.test_fftn)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 458, in check_axes_argument
     assert_array_almost_equal(fftn(x),fftn(x,axes=(-3,-2,-1))) #  
kji_space
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 302, in fftn
     return _raw_fftnd(tmp,shape,axes,1,overwrite_x,work_function)
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 238, in _raw_fftnd
     return work_function(x,s,direction,overwrite_x=overwrite_x)
error: failed in converting 1st argument `x' of _fftpack.zfftnd to C/ 
Fortran array

======================================================================
ERROR: check_definition (scipy.fftpack.basic.test_basic.test_fftn)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 424, in check_definition
     y = fftn(x)
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 302, in fftn
     return _raw_fftnd(tmp,shape,axes,1,overwrite_x,work_function)
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 238, in _raw_fftnd
     return work_function(x,s,direction,overwrite_x=overwrite_x)
error: failed in converting 1st argument `x' of _fftpack.zfftnd to C/ 
Fortran array

======================================================================
ERROR: check_shape_argument (scipy.fftpack.basic.test_basic.test_fftn)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 524, in check_shape_argument
     y = fftn(small_x,shape=(4,4))
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 302, in fftn
     return _raw_fftnd(tmp,shape,axes,1,overwrite_x,work_function)
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 238, in _raw_fftnd
     return work_function(x,s,direction,overwrite_x=overwrite_x)
error: failed in converting 1st argument `x' of _fftpack.zfftnd to C/ 
Fortran array

======================================================================
ERROR: check_shape_axes_argument  
(scipy.fftpack.basic.test_basic.test_fftn)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 535, in check_shape_axes_argument
     y = fftn(small_x,shape=(4,4),axes=(-1,))
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 302, in fftn
     return _raw_fftnd(tmp,shape,axes,1,overwrite_x,work_function)
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 253, in _raw_fftnd
     r = work_function(x,s,direction,overwrite_x=overwrite_x)
error: failed in converting 1st argument `x' of _fftpack.zfftnd to C/ 
Fortran array

======================================================================
ERROR: check_definition (scipy.fftpack.basic.test_basic.test_ifftn)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 593, in check_definition
     y = ifftn(x)
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 331, in ifftn
     return _raw_fftnd(tmp,shape,axes,-1,overwrite_x,work_function)
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 238, in _raw_fftnd
     return work_function(x,s,direction,overwrite_x=overwrite_x)
error: failed in converting 1st argument `x' of _fftpack.zfftnd to C/ 
Fortran array

======================================================================
ERROR: check_random_complex (scipy.fftpack.basic.test_basic.test_ifftn)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 603, in check_random_complex
     assert_array_almost_equal (ifftn(fftn(x)),x)
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 302, in fftn
     return _raw_fftnd(tmp,shape,axes,1,overwrite_x,work_function)
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/basic.py",  
line 238, in _raw_fftnd
     return work_function(x,s,direction,overwrite_x=overwrite_x)
error: failed in converting 1st argument `x' of _fftpack.zfftnd to C/ 
Fortran array

----------------------------------------------------------------------
Ran 51 tests in 250.187s

FAILED (errors=8)
   (secs for 500 calls)
Out[12]: <unittest.TextTestRunner object at 0x24a3190>

In [13]: scipy.__version__
Out[13]: '0.4.5.1570'

In [14]: import os

In [15]: os.uname()
Out[15]:
('Darwin',
'mcxr2.nrl.navy.mil',
'8.4.0',
'Darwin Kernel Version 8.4.0: Tue Jan  3 18:22:10 PST 2006;  
root:xnu-792.6.56.obj~1/RELEASE_PPC',
'Power Macintosh')

In [16]: scipy.show_config()
lapack_opt_info:
     extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
     extra_compile_args = ['-faltivec']
     define_macros = [('NO_ATLAS_INFO', 3)]

fft_opt_info:
     libraries = ['fftw3']
     library_dirs = ['/usr/local/lib']
     define_macros = [('SCIPY_FFTW3_H', None)]
     include_dirs = ['/usr/local/include']

djbfft_info:
   NOT AVAILABLE

fftw3_info:
     libraries = ['fftw3']
     library_dirs = ['/usr/local/lib']
     define_macros = [('SCIPY_FFTW3_H', None)]
     include_dirs = ['/usr/local/include']

blas_opt_info:
     extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
     extra_compile_args = ['-faltivec', '-I/System/Library/Frameworks/ 
vecLib.framework/Headers']
     define_macros = [('NO_ATLAS_INFO', 3)]


Finally, if it matters, here are the FFTW2 and FFTW3 libraries on my  
system:
mcxr2 : 160>ls /usr/local/lib/*fft*
/usr/local/lib/libfftw3.a               /usr/local/lib/libsfftw.a
/usr/local/lib/libfftw3.la*             /usr/local/lib/libsfftw.la*
/usr/local/lib/libfftw3_threads.a       /usr/local/lib/ 
libsfftw_threads.a
/usr/local/lib/libfftw3_threads.la*     /usr/local/lib/ 
libsfftw_threads.la*
/usr/local/lib/libfftw3f.a              /usr/local/lib/libsrfftw.a
/usr/local/lib/libfftw3f.la*            /usr/local/lib/libsrfftw.la*
/usr/local/lib/libfftw3f_threads.a      /usr/local/lib/ 
libsrfftw_threads.a
/usr/local/lib/libfftw3f_threads.la*    /usr/local/lib/ 
libsrfftw_threads.la*

Cheers,

-- Paul

--
Dr. Paul S. Ray              E-mail: Paul.Ray at nrl.navy.mil
Naval Research Laboratory    WWW   : http://xweb.nrl.navy.mil/ 
personnel/paulr/
Code 7655                    Phone : (202) 404-1619
Washington, DC 20375         AIM   : NRLPSR




More information about the SciPy-user mailing list