Perhaps you meant to use mpiifort. That would not be compatible with .o files built by gfortran, but it should help with other problems you mentioned.
That said, it's unusual in my experience to attempt -ipo with MPI builds, and it's not unusual for Fortran applications to perform best with all interprocedural stuff turned off, using -fno-inline-functions.
The problem is due to IPO,because -fast implies -O3 -ipo -static. Static linking is supported for Intel MPI, sojusttry replacing-fast with -O3 -static. I don't know why IPO is causing the problem, but I've not seen IPO speedup MPI codes more than a few percent, so you won't be giving up much by compiling without -ipo.
Intel Developer Support
P.S. -- A race condition with Tim's reply put this thread in a funny state (it didn't show me as the author of the abovereply).
I didn't catch you were using the mpif90 wrapper. As Tim said, use mpiifort/mpiicc if you really want to try an IPO link. But be prepared for long link times...I've seen SPEC MPI2007 codes take an hour or more to link with -ipo.
As noted before you need to use wrappers for Intel compilers: mpiifort, mpiicc,mpiicpc...
'-fast' option is a bit dangerous for MPI applications because all libraries are linked statically and you may have problems with fast interconnects (or may not). It's equivalent to:
"-xHOST -O3 -ipo -no-prec-div -static"
(HOST is a code name for platform) Much better to use :
"-xHOST -O3 -ip -no-prec-div"If you need to link Intel MPI library staticaly he can use '-static_mpi' option.
For "-xHOST -O3 -ipo -no-prec-div" you could add '-static-intel' and all libraries provided by Intel will be linked statically whilst all other will be linked dynamically.
Give it a try - might be this is a solution for you.