[mpich-discuss] mpifort wrapper compiler?

Jeff Squyres (jsquyres) jsquyres at cisco.com
Fri Dec 6 16:21:28 CST 2013


On Dec 6, 2013, at 11:16 AM, Jeff Hammond <jeff.science at gmail.com> wrote:

>> Is this MPICH, or IBM MPI?
> 
> That dichotomy is dated, but not particularly relevant for this discussion.

Ah -- forgive my ignorance; I thought/assumed IBM periodically seeded from upstream MPICH and was an actual separate MPI implementation distribution.  My bad.

>> When I install MPICH 3.x on my Linux commodity cluster, I only see mpif77 and mpif90.  Does MPICH do something different when installed on a BG system?
> 
> IBM deploys MPICH for BG with a bunch of wrappers, one for each bgxl*
> compiler (including an _r variant for each as well).  They are named
> mpixl* to prevent confusion with the GCC wrappers, at least when some
> variants of MPI are used.  See
> https://wiki.alcf.anl.gov/parts/index.php/Mira_MPI_Documentation#Explanation_of_MPI_variants
> for details.  If you have further questions, request an ALCF account
> and you can dig around yourself :-)

Good enough.

But my original point remains: those wrappers are not in MPICH itself -- they come from IBM.

> MPICH does not have these, but I don't see why it would today given
> that it only supports the F77 and F90 interfaces.  

I'm going to be pedantic again, because this is a critical point: there are no such things as "F77" and "F90" interfaces for MPI.  

There is mpif.h, the mpi module, and the mpi_f08 module.  Labeling them as F77 and F90 is incorrect.

1st case in point: mpif.h never worked for Fortran 77.  

2nd case in point: you can use mpif.h with any version of Fortran that supports MPI (e.g., 90, 95, 03, 08), and you can use the mpi module with any version of Fortran that supports MPI and modules (e.g., 90, 95, 03, 08).  The mpi_f08 module works with F08 and later, obviously (it uses some newer features that debuted in Fortran 2008).

My point: They are not F77 and F90 interfaces, since they can be used with many different Fortran versions.

Also, MPI states that you should be able to use all 3 interfaces in a single compilation unit.  

So other than the backwards compatibility issue, a single "mpifort" wrapper that makes all 3 interfaces available makes perfect sense.

I don't think there can be any expectation that "mpif77" provides a true, honest, and only Fortran 77 compiler (because MPI never worked with Fortran 77).

"mpif90" might have a reasonable expectation that it only provides Fortran 90 syntax, and potentially errors out if you use F03/F08 syntax.  But that's kinda weak.

-- 
Jeff Squyres
jsquyres at cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/




More information about the discuss mailing list