I did some tests tonight using the multi-thread support in FFTW3.
The changes to gri_fft.cc were relatively minor, but plugging this into
the existing build environment
will require a little surgery, since you need to add -lfftw3f_threads
to the ld flags, and the ld flags
for FFTW3F are intuited from pkgconfig by default, which doesn’t
include support for multi-threaded
FFTW3F. I didn’t do that surgery, instead manually setting the
FFTW3F_LIBS environment variable
before calling ./configure, and then doing the build.
On my lowly Centrino-Duo laptop, I was able to measure a 40% throughput
improvement between
single-threaded and setting the thread count to 2, for a single
forward FFT of size 2**19.
The implementation allows you to set variables in the [fftw] section of
the prefs file as follows:
[fftw]
nthreads=1
threshold=15000
measure=False
nthreads: maximum number of threads that the FFTW3F scheduler will use
threshold: the minimum FFT size before we turn on multi-threaded FFTW
scheduling
measure: whether the FFT setup uses FFTW_MEASURE or FFTW_ESTIMATE
More tests in my lab tomorrow, on my 6-core Phenom II system.
–
Principal Investigator
Shirleys Bay Radio Astronomy Consortium