FFTW (The Fastest Fourier Transformation in the West) is a C subroutine library 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).
The default FFTW module has been compiled with the Intel compiler suite. To access the library, simply add the fftw module to your login environment:
module add fftw
You'll also need to add the Intel compiler suite of your choice with the relevant module - for example:
module add intel
To compile a stand-alone C source code from file myprogram.c:
icc -I $FFTWINC -o my_program my_program.c -L $FFTWLIB -lfftw3
The resulting executable will be named my_program
As shown in the above example, the fftw module creates two additional variables to allow for ease of compiling: $FTTWINC points to FFTW's header file directory, while $FFTWLIB points to the location of the FFTW library directory. For more complex builds, these can be added to Makefiles, configuration script commands, etc.
The following job submission script template will run an executable my_program, which has been compiled with calls to the FFTW library:
#$ -S /bin/bash #$ -N fftwtest module add fftw ./fftwtest