问题
I'm trying to install fftw-2.1.5 libraries on a IBM cluster with linux, with the --enable-mpi flag, but I have since failed to do so. I need fftw version 2.1.5 because GADGET2 code requires that version, with mpi support.
First, I installed mpich-3.0.4 with:
cd ~/mpich-3.0.4
./configure --prefix=$HOME --enable-shared
make
make install
Then I edited my .bashrc file, adding:
export LD_LIBRARY_PATH="$HOME/lib"
PATH=$PATH:$HOME/bin
Then I tried to install ffw:
./configure --prefix=$HOME/test --enable-mpi LDFLAGS=-L$HOME/lib CPPFLAGS=-I$HOME/include
but I got an error message:
checking for mpicc... mpicc
checking for MPI_Init... no
checking for MPI_Init in -lmpi... no
checking for MPI_Init in -lmpich... no
configure: error: couldn't find mpi library for --enable-mpi
All of my mpi test programs works, and I was able to install everything on my laptop in /usr/local. I tried to search the problem, but I only found that I need to enable LDFLAGS and CCPFLAGS, which I already did.
Anyone knows how to fix this?
EDIT: Following francis' suggestion, I used CFLAGS instead of CPPFLAGS, and I got through the ./compile part. But I receive another error during make:
/opt/ibmcmp/vac/11.1/bin/.orig/xlc: 1501-208 (S) command option D is missing a subargument
It seems a problem related with the ibm compiler (xlc).
EDIT2: Solved by passing mpicc as the right compiler to ./configure, with the CC flag.
For the records, the correct command is:
./configure --prefix=$HOME --enable-mpi --enable-type-prefix --enable-float LDFLAGS=-L$HOME/lib CFLAGS=-I$HOME/include CC=mpicc
(type-prefix and float are extra options required by GADGET2)
来源:https://stackoverflow.com/questions/21142504/install-fftw-2-1-5-with-mpi-in-local