PGI Guide to FFTW

This guide is intended to help build and test the Fastest Fourier Transform in the West (FFTW) library for Linux using PGI 2011 compilers.

Version Information

This guide was created for both the 3.2.2 and the 2.1.5 releases of FFTW compiled using the PGI 2011 compilers. This information is for both x64 processors running 64-bit Linux and x86 processors running 32 bit Linux.

Application Notes

Information about FFTW can be found on the FFTW website at From the FFTW home page:

"FFTW 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). We believe that FFTW, which is free software, should become the FFT library of choice for most applications. "

"Our benchmarks, performed on a variety of platforms, show that FFTW's performance is typically superior to that of other publicly available FFT software, and is even competitive with vendor-tuned codes. In contrast to vendor-tuned codes, however, FFTW's performance is portable: the same program will perform well on most architectures without modification. Hence the name, FFTW, which stands for the somewhat whimsical title of 'Fastest Fourier Transform in the West.' "

"FFT version 2.1.5 is not compatible with the 3.x FFTW versions as the interfaces to the FFT routines changed in the 3.x release stream. Applications which take advantage of FFTW will usually specify where to use the 2.x version or the 3.x version of this library. If in doubt about which library to use, look for where the code either includes FFTW header files or library routines. FFTW 2.x will include fftw.h while FFTW 3.x will include fftw3.h. Since they have different header files and library names, both versions of fftw can be installed on a system at the same time."

Obtaining the Source Code

The FFTW source code is available from the FFTW website referenced above. You may want to check there for recent updates. The current versions are available for download here:



Building, Testing and Installing FFTW

  1. Untar the FFTW package:

       tar -xvzf fftw-3.2.2.tar.gz
       cd fftw-3.2.2


       tar -xvzf fftw-2.1.5.tar.gz
       cd fftw-2.1.5
  2. Set the environment and configure the code:

       env CC=pgcc CFLAGS="-fast -Minfo" F77=pgfortran FFLAGS="-fast -Minfo"
       ./configure --enable-openmp --enable-mpi --prefix=/usr/local
  3. Build the code:

       make >& make.log
  4. Test the build:

       make check >& make_check.log
  5. Finally, install the results:

       sudo make install

Known Issues and Limitations


Click me