The CSF2 has been replaced by the CSF3 - please use that system! This documentation may be out of date. Please read the CSF3 documentation instead. To display this old CSF2 page click here. |
FFTW
Overview
FFTW is a C subroutine library (also with Fortran interfaces) for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).
Versions
- 3.3.6 for all intel nodes – jobs/software using intel compilers v 15.0.3 and openmpi 1.8.3
- 3.3.4 for open64, AMD Bulldozer only – serial (non-MPI) and parallel (MPI) versions of FFTW.
- 3.2.2 for gcc, all platforms – serial (non-MPI) and parallel (MPI) versions of FFTW.
Restrictions on use
FFTW is free software covered by the GNU General Public License, version 2 or later. Note that you may only distribute software linked with libfftw3 under the terms of the GPL.
Set up procedure
In all cases an appropriate MPI modulefile must be loaded first. It will be either an intel, gcc openmpi modulefile or an open64 openmpi modulefile.
You should then load one of the following modulefiles to set up your environment:
- intel for all intel nodes (the openmpi-1.8.3 modulefiles auto load the appropriate version of openmpi and intel compilers 15.0.3)
libs/intel-15.0/fftw3/openmpi-1.8.3/double-mpi/3.3.6 # smp.pe, mpi process binding off libs/intel-15.0/fftw3/openmpi-1.8.3/double-mpi/3.3.6-ib # orte-24-ib.pe, mpi process binding on libs/intel-15.0/fftw3/openmpi-1.8.3/float-mpi/3.3.6 # smp.pe, mpi process binding off libs/intel-15.0/fftw3/openmpi-1.8.3/float-mpi/3.3.6-ib # orte-24-ib.pe, mpi process binding on libs/intel-15.0/openmpi-1.8.3/long-double-mpi/3.3.6 # smp.pe, mpi process binding off libs/intel-15.0/openmpi-1.8.3/long-double-mpi/3.3.6-ib # orte-24-ib.pe, mpi process binding on
- gcc for all platforms (not necessarily optimal for some, you will need to load an appropriate openmpi)
libs/gcc/fftw3/double-mpi/3.2.2 libs/gcc/fftw3/float-mpi/3.2.2 libs/gcc/fftw3/long-double-mpi/3.2.2
- GCC for all platforms, built with SSE and AVX support but not MPI support. Libraries within the module are named with the usual convention for precision as in the table below. OpenMP versions are also available with a “_omp” suffix on the name, e.g.
-lfftw3f_omp
. (The “serial” and “openmp” modules are actually aliases.)libs/gcc/fftw3/serial/3.3.6 # serial only libs/gcc/fftw3/openmp/3.3.6 # openmp
- AMD Open64 compiler for Bulldozer only (you will need to load an appropriate mpi)
libs/open64-4.5.2/fftw3/double-mpi/3.3.4 libs/open64-4.5.2/fftw3/float-mpi/3.3.4 libs/open64-4.5.2/fftw3/long-double-mpi/3.3.4
Running the application
The fftw-wisdom-to-conf
and fftw-wisdom
executables for creating pre-optimized FFTs will be available in your path once a modulefile has been loaded.
Most usage will involved including FFTW header files in your source code and linking against the FFTW libraries during compilation. To assist with this the following environment variables are available. They can be used on your compiler command-line or in Makefiles:
The modulefiles will set an environment variable named FFTW
which can then be used in your compilation process (e.g., in a Makefile) to access the header and library files:
- To inform the compiler of the header file directory use:
-I$FFTW/include
on the command line - To inform the compiler of the library files use:
-L$FFTW/lib -lnameoflibrary
on the command line (see below for nameoflibrary) - In a Makefile use
$(FFTW)
rather than$FFTW
.
The nameoflibrary to use on the compilation line depends on the precision of the FFTW version you are using and whether you wish to use the MPI version of the library.
Precision | Library (.a and .so) | Compiler flag |
---|---|---|
Single (float) | libfftw3f | -lfftw3f |
libfftw3f_mpi | -lfftw3f_mpi | |
Double (the default – do not add a ‘d’ to the library names!) |
libfftw3 | -lfftw |
libfftw3_mpi | -lfftw3_mpi | |
Long double | libfftw3l | -lfftwl |
libfftw3l_mpi | -lfftw3l_mpi |
Both static (.a
) and shared/dynamic (.so
) versions of the libraries are available.
Further info
- The FFTW Home Page
Updates
2014-04-08: open64 BD build