I have a fortran code using MPI and calling FFTW3. It can be successfully compiled by the command mpiifort. But when I try to use mpif90, it gives errors like:
fftwtest_fwd.f90:(.text+0x2a6): undefined reference to `fftw_mpi_init'
fftwtest_fwd.f90:(.text+0x2e7): undefined reference to `fftw_mpi_local_size_2d_f03'
fftwtest_fwd.f90:(.text+0x2f7): undefined reference to `fftw_alloc_complex'
fftwtest_fwd.f90:(.text+0x46e): undefined reference to `fftw_mpi_plan_dft_2d_f03'
fftwtest_fwd.f90:(.text+0x630): undefined reference to `fftw_mpi_execute_dft'
fftwtest_fwd.f90:(.text+0x937): undefined reference to `fftw_destroy_plan'
fftwtest_fwd.f90:(.text+0x93c): undefined reference to `fftw_mpi_cleanup'
fftwtest_fwd.f90:(.text+0x948): undefined reference to `fftw_free'
I compile the code using my laptop, the parallel studio xe 2017 has been installed.
However, when I use mpiffort and mpif90 compile the same code on a server of my organization, everything is good. Could someone give me directions? Thank you very much.