#! /bin/bash #This script compile and install fftw 3.1.2 for a Rocks Linux cluster in /share/apps/fftw3. Run this script as root # assuming _impi_410024_sa is already installed cd /share/apps rm fftw-3.1.2.tar.gz wget http://www2.fizik.usm.my/configrepo/howto/fftw/fftw-3.1.2.tar.gz gunzip fftw-3.1.2.tar.gz tar -xvf fftw-3.1.2.tar cd fftw-3.1.2 ./configure --with-g77-wrappers --enable-mpi --enable-threads --enable-openmp CC="icc" FC="/share/apps/mpich2/bin/mpif90" --prefix=/share/apps/fftw3 # FC="/share/apps/intel/impi/4.1.0.024/bin64/mpiifort" # FC="mpif90" also can. But prefer to use mpif90 that is compiled with ifort. /share/apps/mpich2/bin/mpif90 is assumed to be compiled using ifort (instead of gfrotran) ## "CC=icc" would not work. Must use "CC=cc" # Check if the output of ./configure is OK before proceed. make make install ## the fftw3 lib is now be found in /share/apps/fftw3/lib and the include file is found in /share/apps/fftw3/include/ mv fftw-3.1.2.tar configrepo #Note that after installation, the directory that contains fftw3 library is /shara/apps/fftw3. The folder fftw-3.1.2 in /share/apps is only a remnent after installation. fftw-3.1.2 will be removed to make things look cleaner in /share/apps mv fftw-3.1.2 configrepo mv fftw-3.1.2.tar configrepo # Place the library path of fftw3 in any home's user ~/.bashrc # export LD_LIBRARY_PATH=/share/apps/fftw3'