Using FFTW

The FFTW library is available on the cluster. This C library (also callable from C++ and Fortran) is for computing the discrete Fourier transform in one or more dimensions of real and complex data of arbitrary input size. This was compiled on our Xeon cluster compiled using the GNU C compiler and includes MPI support (both Open MPI and MVAPICH2).

To use FFTW3, load the fftw module:

module load gcc
module load openmpi
module load fftw
-or-
module load gcc
module load mvapich2
module load fftw

To include the FFTW3 header files compile your source with: -I$BRAZOS_FFTW3_INC

Below are examples of linking against the various FFTW libraries.

Example Description
-L$BRAZOS_FFTW3_LIB -lfftw3 single-threaded, double precision
-L$BRAZOS_FFTW3_LIB -lfftw3f single-threaded, single precision
-L$BRAZOS_FFTW3_LIB -lfftw3l single-threaded, long-double precision
-L$BRAZOS_FFTW3_LIB -lfftw3q -lquadmath -lm single-threaded, quadruple precision
-L$BRAZOS_FFTW3_LIB -lfftw3_threads -lfftw3 -lm -lpthread multi-threaded, double precision
-L$BRAZOS_FFTW3_LIB -lfftw3f_threads -lfftw3f -lm -lpthread multi-threaded, single precision
-L$BRAZOS_FFTW3_LIB -lfftw3l_threads -lfftw3l -lm -lpthread multi-threaded, long-double precision
-L$BRAZOS_FFTW3_LIB -lfftw3q_threads -lfftw3q -lquadmath -lm -lpthread multi-threaded, quadruple precision
-L$BRAZOS_FFTW3_LIB -lfftw3_mpi -lfftw3 -lm MPI, double precision using the mpicc compiler
-L$BRAZOS_FFTW3_LIB -lfftw3f_mpi -lfftw3f -lm MPI, single precision using the mpicc compiler
-L$BRAZOS_FFTW3_LIB -lfftw3l_mpi -lfftw3l -lm MPI, long-double precision using the mpicc compiler

NOTE: The quadruple precision library does not support MPI.

Documentation for FFTW is available at the FFTW website .