Multi-threaded FFTW

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

When I was originally messing around with multi threading for my
application, the use of measure gave a large improvement. Though I am
using small fft sizes (1024) but high data rates. Also it was a custom c
program.


From:
discuss-gnuradio-bounces+bruce.stansby=removed_email_address@domain.invalid
[discuss-gnuradio-bounces+bruce.stansby=removed_email_address@domain.invalid]
on behalf of Marcus D. Leech [[email protected]]
Sent: Monday, 6 December 2010 3:05 PM
To: [email protected]
Subject: [Discuss-gnuradio] Multi-threaded FFTW

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


Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio