ALIs

kommt noch

FFTW (Fastest Fourier Transform in the West)

FFTW (Fastest Fourier Transform in the West) is a comprehensive collection of fast C routines for computing the discrete Fourier transform (DFT) in one or more dimensions, of both real and complex data, and of arbitrary input size. FFTW also includes parallel transforms for distributed-memory systems. FFTW is usually faster (and sometimes much faster) than all other freely-available Fourier transform programs found on the Net.

Introductory Remarks

What is FFTW?

FFTW, the Fastest Fourier Transform in the West, is a comprehensive collection of fast C routines for computing the discrete Fourier transform (DFT) in one or more dimensions, of both real and complex data, and of arbitrary input size. FFTW also includes parallel transforms for both shared- and distributed-memory systems.

Authors of the Library

The FFTW package was developed at MIT by Matteo Frigo and Steven G. Johnson.

Using the FFTW installations at LRZ

FFTW is provided on all LRZ HPC platforms (Itanium-based and X86_64-based systems). To prepare for using the library, it is most convenient to first load the appropriate environment module, for example

module load fftw

for the default version. An overview of available modules is provided in the following table.

Module Remarks
serial or threaded processing
fftw/serial/3.2.2 default version, provides all precisions and threading (Posix Threads as well as OpenMP)
fftw/serial/v3_mkl91_c serial MKL 9.1 based C interface
fftw/serial/v3_mkl91_f77 serial MKL 9.1 based Fortran interface
fftw/threads/v3_mkl91_c threaded MKL 9.1 based C interface
fftw/threads/v3_mkl91_f77 threaded MKL 9.1 based Fortran interface
MPI parallel processing
(auto-selection for SGI MPT, Intel MPI, Parastation MPI)
fftw/mpi/2.1.5 8 byte float. Incompatible with V3 API!
fftw/mpi/2.1.5_r4 4 byte float. Incompatible with V3 API!
fftw/mpi/3.2.0 8 byte float. Alpha Release!

After having loaded the appropriate environment module, you can use several environment variables to compile and link your application. For example, you may compile your code with

cc -c $FFTW_INC foo.c

and link it with

cc -o myprog.exe ... foo.o $FFTW_LIB

Here is the complete list of environment variables provided for linking by the default version. Exceptions are described in the next section.

Environment Variable Purpose
$FFTW_LIB For linking of serial programs. Includes all precisions.
$FFTW_OPENMP_LIB For linking of OpenMP programs. Includes all precisions.
$FFTW_PTHREADS_LIB For linking of programs using Posix threads. Includes all precisions.

Special Cases

Varying Precisions

The float data types of various size are automatically supported in the 3.x releases. For the 2.x releases, separate modules must be loaded for single and double precision and hence the two precisions cannot be simultaneously used in the same program.

Thread safeness

Some FFTW calls, notably the plan generators, must be called outside any threaded regions.

MPI parallelism

An MPI interface is offered for version 2.1.5 as well as version 3.2.0 of FFTW. These interfaces are incompatible. The 3.2.0 version is a pre-release, please carefully check your results.

FFTW interface to MKL

Newer releases of the Intel MKL contain a partial implementation of the FFTW interface: in version 9.1 partial C and Fortran interfaces are supplied as separate libraries. Please load one of the environment modules from the above table with the last component v3_mkl91_c or v3_mkl91_f77 to access the corresponding library using the same environment variables as described above.

Note that it is a good idea to check for a returned NULL pointer after calling a fftw_plan setup routine, otherwise further calls to unsupported parts of the FFTW interface will simply crash your code. Please check the MKL Release Notes for details on which calls are unsupported.

The advantage of using the MKL is that you obtain improved performance, even compared with standard FFTW.

Documentation

On the LRZ Web Server

External References