[mpich-discuss] mpifort wrapper compiler?
gus at ldeo.columbia.edu
Thu Dec 5 12:15:52 CST 2013
On 12/05/2013 11:43 AM, Jeff Squyres (jsquyres) wrote:
> On Dec 5, 2013, at 10:22 AM, Jeff Hammond<jeff.science at gmail.com> wrote:
>> It is important to separate out the F77 wrapper from the F90+ one to support the case where the F77 compiler cannot handle F90+ code and vice versa. The IBM compiler is this way because of fixed/free source form handling.
> I'm not sure I understand this -- my understanding is that compilers differentiate between the different forms of Fortran (fixed vs. free) via the .suffix.
> This is very much in line with compilers like ifort, pgifort, etc.
Besides, suffixes can be overriden by additional flags
to the compiler/compiler wrapper
to adjust to a particular form.
ifort: -fixed/-nofixed (besides -extend-source 72/80/132);
Intel seems to be the most indulgent compiler (except that it doesn't
use most of the AMD SIMD instructions). It digests most codes
that other compilers do not. However, some of this indulgence probably
means making decisions about the code semantics that may or may not be
what the programmer intended to do.
It is very true that compiler vendors are consolidating
the interface to a single name, the f77 name becoming just
a soft link, etc, so having different names for the MPI compiler
wrapper may become totally immaterial.
However, I wonder if the various language construct semantics
of Fortran I, II, IV, 66, 77, 90, 95, 2003, 2008, etc,
can be distinguished using compiler flags.
Is it an F90 pointer or a "Cray pointer"?
There is plenty of code here that use legacy non-standard F77
"Cray pointers", and certainly funnier constructs also,
sometimes mixed with F90/F2003/F2008 constructs.
From my illiterate user perspective Fortran is messier than C,
maybe for carrying too much legacy stuff along with
the latest greatest items.
Even John Backus seems to have abjured it.
I would love to be ensured that Fortran's various incarnations
behave as single language, that there are well understood standards
that all compilers follow, but I am not sure if reality is this rosy.
In my limited experience, ifort, pgfortran, and gfortran have different
opinions about semantics.
More information about the discuss