Reputation: 493
What is the difference between these two compilers, mpif90 and mpifort? Both seems to be for Fortran 90 code. Both got installed when I installed openMPI on Linux. Are the usage (compiler options) different?
Upvotes: 10
Views: 10323
Reputation: 1869
According to open-mpi.org:
mpifort is a new name for the Fortran wrapper compiler that debuted in Open MPI v1.7. It supports compiling all versions of Fortran, and utilizing all MPI Fortran interfaces (mpif.h, use mpi, and [use mpi_f08]). There is no need to distinguish between "Fortran 77" (which hasn't existed for 30+ years) or "Fortran 90" — just use mpifort to compile all your Fortran MPI applications and don't worry about what dialect it is, nor which MPI Fortran interface it uses. Other MPI implementations will also soon support a wrapper compiler named mpifort, so hopefully we can move the whole world to this simpler wrapper compiler name, and eliminate the use of mpif77 and mpif90.
Specifically: mpif77 and mpif90 are deprecated as of Open MPI v1.7. Although mpif77 and mpif90 still exist in Open MPI v1.7 for legacy reasons, they will likely be removed in some (undetermined) future release. It is in your interest to convert to mpifort now. Also note that these names are literally just sym links to mpifort under the covers. So you're using mpifort whether you realize it or not. :-) Basically, the 1980's called; they want their mpif77 wrapper compiler back. Let's let them have it.
Upvotes: 0
Reputation: 5223
The MPI standard says nothing about the various compiler wrappers, except that "Some MPI libraries are shipped together with special compilation scripts".
Thus, one needs to consult OpenMPI's documentation:
http://www.open-mpi.org/faq/?category=mpi-apps#mpifort-vs-mpif77-and-mpif90
The gist of it is that modern fortran compilers are better about determining if code should be treated like fortran 2008, fortran 2003, fortran 90, fortran 77, or whatever. OpenMPI wants folks to just use mpifort, and let the fortran front-end compiler do the work.
Upvotes: 8