[SciPy-user] fftw, scipy ("old") install
Arnd Baecker
arnd.baecker at web.de
Mon Oct 17 06:32:01 EDT 2005
Hi,
it seems that I failed with fftw on the opteron ;-) -
scipy fft is (much) slower than the Numeric one
(see output below).
I installed fftw via::
tar xzf ../Sources/fftw-3.0.1.tar.gz
cd fftw-3.0.1/
./configure CFLAGS=-fPIC --prefix=$PHOME
make
make install
and for `python scipy_core/scipy_distutils/system_info.py`
I got (during the installation):
dfftw_info:
( library_dirs = /scr/python/lib:/usr/local/lib:/usr/lib )
( include_dirs = /usr/local/include:/usr/include:/scr/python/include )
dfftw not found
NOT AVAILABLE
dfftw_threads_info:
( library_dirs = /scr/python/lib:/usr/local/lib:/usr/lib )
( include_dirs = /usr/local/include:/usr/include:/scr/python/include )
dfftw threads not found
NOT AVAILABLE
djbfft_info:
( library_dirs = /scr/python/lib:/usr/local/lib:/usr/lib )
( include_dirs = /usr/local/include:/usr/include:/scr/python/include )
NOT AVAILABLE
fftw_info:
( library_dirs = /scr/python/lib:/usr/local/lib:/usr/lib )
( include_dirs = /usr/local/include:/usr/include:/scr/python/include )
( paths: /scr/python/lib/libfftw3.a )
( paths: /scr/python/include/fftw3.h )
( library_dirs = /scr/python/lib:/usr/local/lib:/usr/lib )
FOUND:
libraries = ['fftw3']
library_dirs = ['/scr/python/lib']
define_macros = [('SCIPY_FFTW3_H', None)]
include_dirs = ['/scr/python/include']
fftw_threads_info:
( library_dirs = /scr/python/lib:/usr/local/lib:/usr/lib )
( include_dirs = /usr/local/include:/usr/include:/scr/python/include )
fftw threads not found
NOT AVAILABLE
So I thought everything is ok.
Reconsidering this after seeing the poor performance
shows that, `nm _fftpack.so` gives me no symbols related to fftw.
What did I do wrong?
(I know I could have build with these additional options:
--enable-float: Produces a single-precision version of FFTW (float)
--enable-long-double: Produces a long-double precision
--enable-threads --enable-sse2
But is it necessary?)
And for future builds:
Is there a way to check (on the python level) which fft is used
*after* the installation?
Best, Arnd
Fast Fourier Transform
=================================================
| real input | complex input
-------------------------------------------------
size | scipy | Numeric | scipy | Numeric
-------------------------------------------------
100 | 0.07 | 0.06 | 0.94 | 0.06 (secs for 7000 calls)
1000 | 0.11 | 0.07 | 0.82 | 0.07 (secs for 2000 calls)
256 | 0.17 | 0.11 | 1.74 | 0.11 (secs for 10000 calls)
512 | 0.31 | 0.19 | 2.32 | 0.20 (secs for 10000 calls)
1024 | 0.05 | 0.04 | 0.36 | 0.03 (secs for 1000 calls)
2048 | 0.10 | 0.07 | 0.61 | 0.07 (secs for 1000 calls)
4096 | 0.10 | 0.11 | 0.57 | 0.13 (secs for 500 calls)
8192 | 0.23 | 0.49 | 1.26 | 0.48 (secs for 500 calls)
.....
Multi-dimensional Fast Fourier Transform
===================================================
| real input | complex input
---------------------------------------------------
size | scipy | Numeric | scipy | Numeric
---------------------------------------------------
100x100 | 0.15 | 0.07 | 0.15 | 0.08 (secs for 100 calls)
1000x100 | 0.14 | 0.08 | 0.13 | 0.08 (secs for 7 calls)
256x256 | 0.14 | 0.08 | 0.14 | 0.07 (secs for 10 calls)
512x512 | 0.32 | 0.14 | 0.33 | 0.15 (secs for 3 calls)
.....
Inverse Fast Fourier Transform
===============================================
| real input | complex input
-----------------------------------------------
size | scipy | Numeric | scipy | Numeric
-----------------------------------------------
100 | 0.07 | 0.15 | 1.26 | 0.15 (secs for 7000 calls)
1000 | 0.12 | 0.17 | 0.93 | 0.18 (secs for 2000 calls)
256 | 0.18 | 0.28 | 2.15 | 0.29 (secs for 10000 calls)
512 | 0.32 | 0.46 | 2.74 | 0.47 (secs for 10000 calls)
1024 | 0.05 | 0.07 | 0.41 | 0.08 (secs for 1000 calls)
2048 | 0.11 | 0.14 | 0.66 | 0.15 (secs for 1000 calls)
4096 | 0.10 | 0.19 | 0.59 | 0.19 (secs for 500 calls)
8192 | 0.23 | 0.68 | 1.30 | 0.66 (secs for 500 calls)
.......
Inverse Fast Fourier Transform (real data)
==================================
size | scipy | Numeric
----------------------------------
100 | 0.08 | 0.17 (secs for 7000 calls)
1000 | 0.14 | 0.10 (secs for 2000 calls)
256 | 0.16 | 0.26 (secs for 10000 calls)
512 | 0.26 | 0.33 (secs for 10000 calls)
1024 | 0.05 | 0.05 (secs for 1000 calls)
2048 | 0.14 | 0.07 (secs for 1000 calls)
4096 | 0.14 | 0.06 (secs for 500 calls)
8192 | 0.28 | 0.19 (secs for 500 calls)
....
Fast Fourier Transform (real data)
==================================
size | scipy | Numeric
----------------------------------
100 | 0.07 | 0.07 (secs for 7000 calls)
1000 | 0.11 | 0.05 (secs for 2000 calls)
256 | 0.18 | 0.12 (secs for 10000 calls)
512 | 0.30 | 0.18 (secs for 10000 calls)
1024 | 0.05 | 0.03 (secs for 1000 calls)
2048 | 0.10 | 0.04 (secs for 1000 calls)
4096 | 0.10 | 0.04 (secs for 500 calls)
8192 | 0.20 | 0.13 (secs for 500 calls)
More information about the SciPy-User
mailing list