I am trying to compile a big solver using a makefile. When typing make, the following command gets executed:
mpif90 -O2 -fpp -I/somePath/ -c precision.F90
I get the following error:
gfortran: error: unrecognized command line option ‘-fpp’
I typed which mpif90
to see where it is pointing to:
/usr/local/intel14/impi/4.1.3.048/intel64/bin/mpif90
I tried to manually enter the command to make sure it did not have anything to do with the makefile
and I got the same error. Why is gfortran
being called? It must be some linking error but I can't figure it out.
The comments put me on the right track. I did not know mpif90
was just a wrapper.
$ /usr/local/inter14/impi/4.1.3.048/intel64/bin/mpif90 -v
mpif90 for the Intel(R) MPI Library 4.1 for Linux*
Copyright(C) 2003-2014, Intel Corporation. All rights reserved.
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gcc5.2/libexec/gcc/x86_64-unknown-linux-gnu/5.2.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr/local/gcc5.2 --disable-multilib
Thread model: posix
gcc version 5.2.0 (GCC)
I asked the code's author to do the same, the output pointed to an intel compiler. So what remains is to link ifort
. This fixed it for me (bash shell):
export I_MPI_F90=ifort