cd /path/to wget http://www.fftw.org/fftw-3.3.8.tar.gz tar xf fftw-3.3.8.tar.gz
cd fftw-3.3.8 CC=mpicc CXX=mpicxx FC=mpif90 ./configure --prefix=/path/to/fftw make make install