The spectral solver as well as some pre and post processing tools use Fast Fourier Transforms (FFT). The library used is the »Fastest Fourier Transform in the West« (FFTW). FFTW is free software, released under the GNU General Public License.


DAMASK requires FFTW version 3.3 or later.


There are 3 ways how to install FFTW.

Distribution package

FFTW is generally available as a package on Unix-based operating systems. However, the MPI version must be available to compile the current DAMASK version.

Install Ubuntu 20.04 packages:

> apt-get install libfftw3-3 libfftw3-dev libfftw3-mpi3 libfftw3-mpi-dev

Automated installation by PETSc

PETSc offers the possibility to download, configure, and install FFTW. See the PETSc manual for further instructions.

Compile from source

If there is a need to compile FFTW on your own machine, download the sources from www.fftw.org/download and follow the instructions on www.fftw.org/#documentation. The C compiler should match the vendor of the Fortran compiler (ie. icc for ifort and gcc for gfortran) FFTW must be built with MPI support. Suitable options are --enable-mpi --enable-sse2 --enable-avx --enable-shared --disable-fortran. The required library files are called libfftw3.a, libfftw3.la, libfftw3_mpi.a, and libfftw3_mpi.la.

Known issues

  • Libraries are missing (using a distribution package)
    Install the developer version as well (e.g. on Ubuntu 18.04, the packages libfftw3-dev and libfftw3-mpi-dev)
  • Cannot find fftw_alloc_complex
    Most probably you’re using an older version of FFTW without the Fortran 2003 interface. Update your FFTW to 3.3.x