[MPI3 Fortran] Results of San Jose Forum meeting

Bill Long longb at cray.com
Sat Mar 13 14:59:44 CST 2010

Rolf Rabenseifner wrote:
> Hi,
> a short question: If an MPI library implementation declares the
> MPI routines as bind C, is then the internal call mechanism
> standardized?

It is between the Fortran compiler and its companion C compiler, as long 
as each argument is "interoperable" as specified in the Fortran 
standard.   The limitation of compatibility only between companion 
processors is key.  It is not required (or even practical)  that a 
Fortran compiler be compatible with a C compiler it does not know about.

Typically, this results in two camps:

1) The Fortran compiler vendor also supplies a C compiler, in which case 
the companion C compiler is its own.  This is common, and the most 
robust option since the vendor controls both compilers, and probably 
uses a common compiler back-end. Such a vendor may choose to support 
additional companion C processors, as long as there is some mechanism to 
specify which one at compile time.

2) The Fortran compiler vendor does not supply its own C compiler, in 
which case the usual selection of the companion C compiler is gcc.  This 
selection is not required by the standard - but it is practical.

Normally,  vendor-supplied MPI libraries will have been compiled with a 
known  companion C compiler, so things should work.


> Or identical with all C compilers because the handle call by
> reference for integers and structurs identical? 
> Best regards
> Rolf
> ----- "Aleksandar Donev" <adonev at lbl.gov> wrote:
>> Hi,
>>> I hope that these citations are correct in relation to the official
>>> Fortran 2003 standard.
>> Sure, it all is more or less right.
>>> Based on this, for use mpi and use mpi3, only one identical
>>> backend (written in C) should be necessary.
>> OK, fine, but that is not implied by the words you quoted. For
>> example, 
>> it is perfectly possible (plausible) for an integer and a struct to be
>> passed differently (e.g., integer goes in register, the struct on the
>> stack), and adding SEQUENCE does nothing to change that. If you are 
>> relying on some "backend" (meaning, really, ABI) property, say so, do
>> not pretend that the Fortran standard guarantees something it does
>> not.
>> This is not to say that it will not be possible to still use one
>> backend 
>> even if the interface says TYPE(MPI_Comm) instead of INTEGER---but
>> that 
>> is outside the scope of the Fortran standard. One should instead look
>> at 
>> ABIs and conventions compilers use to pass such arguments around.
>> Best,
>> Aleks
>> _______________________________________________
>> mpi3-fortran mailing list
>> mpi3-fortran at lists.mpi-forum.org
>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-fortran

Bill Long                                           longb at cray.com
Fortran Technical Support    &                 voice: 651-605-9024
Bioinformatics Software Development            fax:   651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101

More information about the mpiwg-fortran mailing list