Search code examples
fftwmpich

Installing fftw-3.3.7


I have installed mpich in my laptop with ubuntu 18.04. I have been trying to install fftw-3.3.7. Wile configuring I have used following command

./configure --prefix=/opt/fftw MPICC=mpicc CC=gcc --enable-type-prefix --with-gcc --enable-mpi F77=gfortran F90=gfortran --with-g77-wrappers LDFLAGS="-L/opt/mpich/lib" MPILIBS="-L/opt/mpich/lib -lmpi" CPPFLAGS="-I/opt/mpich/include "

I am getting error as

configure: error: could not find mpi library for --enable-mpi

I have checked echo $LD_LIBRARY_PATH and it shows

:/opt/mpich/lib

I have also checked path of installed mpich using which mpicc it shows :

/opt/mpich/bin

What is wrong here?


Solution

  • This:

    PATH=$PATH:/opt/mpich/bin CC=mpicc F77=mpif77 F90=mpif90 \ 
      ./configure --prefix=/opt/fftw --enable-mpi --with-g77-wrappers
    

    would be more the correct command. You are mixing environment variables and configure options. Environment variables needs to be assigned before ./configure. Also --enable-type-prefix --with-gcc both are meaningless with fftw3's configure script.

    But please help me understand, why one would want to have their own build instead of using the distribution's. After all, that's why we install distributions?

    sudo apt -y install libmpich-dev

    Would have solved all your issues. I undertand the specific fftw build. It's a performance issue. But mpich2?