[mpich-discuss] mpifort wrapper compiler?
Jeff Hammond
jeff.science at gmail.com
Fri Dec 6 08:47:47 CST 2013
On Fri, Dec 6, 2013 at 8:31 AM, Jeff Squyres (jsquyres)
<jsquyres at cisco.com> wrote:
> On Dec 6, 2013, at 9:16 AM, Jeff Hammond <jeff.science at gmail.com> wrote:
>
>> integer JeffSquyresIsUnfortunatelyRightSometimes
>
> LOL!
>
>> The IBM XLF compiler can compile any valid Fortran code by specifying
>> the language requested explicitly with a flag. I suppose I can just
>> do the following:
>>
>> alias mpif77='mpifort -gimme-f77'
>> alias mpif90='mpifort -gimme-f90'
>> alias mpif95='mpifort -gimme-f95'
>> alias mpif03='mpifort -gimme-f03'
>> alias mpif08='mpifort -gimme-f08'
>>
>> I just find this annoying since it adds a previously unnecessary step
>> to users' workflow and breaks backwards compatibility for anyone that
>> relies upon their MPI implementation to provide mpif77.
>
> A fair point.
>
> Heh, but you could look at this as your MPI implementation gently prodding you to stop using ancient Fortran dialects. ;-) (yes, I know, I know... it's just a joke)
>
> However, keep in mind that OMPI (and MPICH) only have mpif77 and mpif90 -- not mpif95, mpif03, or mpif08.
>
> Just to be clear: are you saying that, for example, on IBM platforms, MPICH's mpif77 and mpif90 enforce F77 and F90 language compliance?
>
On Blue Gene:
#!/bin/bash
echo "mpixlf77 points to bgxlf, which assumes fixed source form and
thus will not compile Fortran 90+ programs i.e. free source form."
for n in 90 95 2003 2008; do
echo "mpixlf$n points bgxlf$n, which assumes free source form and
will likely fail to compile syntax incompatible with Fortran $n"
done
By default, XLF does not enforce strict language compliance, but it
will enforce a wide range of syntax requirements that cause user codes
to fail to compile. I recall more than one case where Fortran 2003
and 2008 differ just slightly and users have to use the compiler
associated with precisely the language that they are trying to use.
The free/fixed and comment syntax issues are by far the biggest
problem, but they are not the only ones.
Jeff
--
Jeff Hammond
jeff.science at gmail.com
More information about the discuss
mailing list