FFTW

General Information

Home pageVersionsModule dependencies
CompilerMPT
www.fftw.org2.1.5Static libraries only
3.3Static libraries only
3.3.3intelcomp/13.0.1mpt/2.06
3.3.4intelcomp/14.0.1mpt/2.09
3.3.5intelcomp/17.0.0mpt/2.14

FFTW is a library developed at Massachusetts Institute of Technology (MIT) for computing the Discrete Fourier Transform (DFT) in one or more dimensions, of both real and complex data. The library supports serial transforms, multi-threaded transforms, and distributed-memory parallel transforms using MPI. FFTW include interfaces for both C and Fortran, and support single and double precision.

Usage on Vilje

Load one of the fftw, and the corresponding intel compiler and mpt (since version 3.3.3), modules to use FFTW on Vilje, e.g.:

$ module load intelcomp/14.0.1 mpt/2.09 fftw/3.3.4

Since the version 3.3.3 installation FFTW include serial and parallel libraries available as both static and shared libraries, see the table below:

PrecisionSerialThreads (POSIX)OpenMPMPI
singlestaticlibfftw3f.alibfftw3f_threads.alibfftw3f_omp.alibfftw3f_mpi.a
sharedlibfftw3f.solibfftw3f_threads.solibfftw3f_omp.solibfftw3f_mpi.so
doublestaticlibfftw3.alibfftw3_threads.alibfftw3_omp.alibfftw3_mpi.a
sharedlibfftw3.solibfftw3_threads.solibfftw3_omp.solibfftw3_mpi.so

The basic usage of FFTW is to link with the serial FFTW library, e.g. in double precision, add at the link stage -lfftw3. When using one of the parallel versions of FFTW, in addition add the appropriate library from the table.

For example, to link a C program using OpenMP transforms with the double precision FFTW version, using the Intel compiler and linking shared libraries, specify:

$ icc -openmp fft_test.c -lfftw3_omp -lfftw3

With static linking of the libraries, specify:

$ icc -openmp fft_test.c -Bstatic -lfftw3_omp -lfftw3

Intel MKL FFTW3 Interfaces

Intel MKL provides FFTW3 intefaces to enable applications using FFTW to gain performance with Intel MKL without changing the program source code, see FFTW3 Interface to MKL

Further Information

Scroll to Top