Including mpif.h is not enogh.
As far as I know, there is no MPI offering included within any compiler supported on this list. You haven't told us enough about what you are doing for anyone to answer. Which MPI, which compiler, which OS? MPI installations generally set up wrappers for your compilers, so you would use mpif77, mpif90, mpicc to compile and link subroutines which refer to MPI library. mpif77 and mpif90 could be identical, both using CVF or IFL as the compiler. Read the instructions which come with your MPI and tell us what isn't working.