#! /bin/bash ## Install fftw-3.3.4 ## Default location is dir=$HOME/ii ## Execute this in $dir/script/ HOME=/home/$(whoami) dir=$HOME/ii cd $dir export dir=/home/$(whoami)/ii if [ -d $HOME/ii/configrepo ]; then echo "$HOME/ii/configrepo" existed else mkdir $HOME/ii/configrepo fi cd $dir/configrepo rm -rf fftw-3.3.4.tar.gz wget http://www2.fizik.usm.my/configrepo/howto/fftw/fftw-3.3.4.tar.gz tar -zxvf fftw-3.3.4.tar.gz cd fftw-3.3.4 ./configure --with-g77-wrappers --enable-mpi --enable-threads --enable-openmp CXX="$dir/openmpi-1.8.5/bin/mpicxx" CC="$dir/openmpi-1.8.5/bin/mpicc" CPP="$dir/openmpi-1.8.5/bin/mpic++ -E" CXXCPP="$dir/openmpi-1.8.5/bin/mpicxx -E" FC='gfortran' --prefix=$dir/fftw-3.3.4 Fi77=gfortran FFLAGS="-I/$dir/openmpi-1.8.5/include" LDFLAGS=-L/$dir/openmpi-1.8.5/lib CPPFLAGS="-I/$dir/openmpi-1.8.5/include" --enable-shared --enable-float #./configure --with-g77-wrappers --enable-mpi --enable-threads --enable-openmp CXX="$dir/openmpi-1.8.5/bin/mpicxx" CC="$dir/openmpi-1.8.5/bin/mpicc" CPP="$dir/openmpi-1.8.5/bin/mpic++ -E" CXXCPP="$dir/openmpi-1.8.5/bin/mpicxx -E" FC='gfortran' --prefix=$dir/fftw-3.3.4 Fi77=$dir/openmpi-1.8.5/bin/mpif77 FFLAGS="-I/$dir/openmpi-1.8.5/include" LDFLAGS=-L/$dir/openmpi-1.8.5/lib CPPFLAGS="-I/$dir/openmpi-1.8.5/include" --enable-shared --enable-float make -j 4 make check # as user make install #exectute this as su # make installcheck #execute this as user ################### worked ## ./configure --with-g77-wrappers --enable-mpi --enable-threads --enable-openmp CXX="mpicxx" CC="mpicc" CPP="mpic++ -E" CXXCPP="mpicxx -E" FC='gfortran' --prefix=/home/tlyoon/ii/fftw-3.3.4 F77=mpif77 FFLAGS="-I/$HOME/ii/openmpi-1.8.5/include" LDFLAGS=-L/$HOME/ii/openmpi-1.8.5/lib CPPFLAGS="-I/$HOME/ii/openmpi-1.8.5/include" --enable-shared --enable-float