[MPI3 Fortran] Results of San Jose Forum meeting

Bill Long longb at cray.com
Thu Mar 11 09:58:38 CST 2010



Jim Xia wrote:
> 
> mpi3-fortran-bounces at lists.mpi-forum.org wrote on 03/11/2010 08:52:54 AM:
> 
> 
>  > > >
>  > > >    type MPI_Comm
>  > > >        sequence
>  > > >        INTEGER :: val
>  > > >    end type MPI_Comm
>  > > >
> 
>  >
>  > Rolf explained the SEQUENCE as meaning that this would guarantee
>  > that an instance of the derived type in memory would be exactly the
>  > same as a single INTEGER.
> 
> 
> That's not guaranteed by Fortran standard.  SEQUENCE type means compiler 
> can not reorder the components with regard to their declaration 
> ordering.  Nothing specific about there being no padding or alignment. 
>  I'd study ALL compiler behaviors before making such a statement.
> 

Jim is correct about the Fortran requirements (or lack thereof) 
regarding SEQUENCE in a type.


> 
> Back to the (void *) support in Fortran.  Currently many compilers 
> support this using vendor-specific "IGNORE_TKR directives" to suppress 
> compile time checking.  This is naturally used in the case when the 
> caller is passing the address of the buffer to the routine.  The current 
> work item in TR 29113 is to use assumed type.  But that will cause the 
> caller to pass a pointer to a descriptor (a C-like struct), instead of 
> the leading address of the buffer used in MPI routines.  The assumed 
> type way (to be standardize) is completely different from the 
> pass-by-reference way used by IGNORE_TKR.  Craig has assured us that MPI 
> forum is happy with this design.  Just want to use this opportunity to 
> restate the fact so no surprises warranted once the assumed type is 
> standardardized.

This is not the way the TR is currently written, nor intended.  Whether 
a descriptor is passed depends on the DIMENSION attribute of the dummy 
argument. Declarations of dimension(:) [assumed-shape, allocatable, or 
pointer] or dimension(..) [assumed-rank]  will result in 
pass-by-descriptor.  Declarations of dimension(*) or dimension(n) will 
result in pass-by-address.   The type declaration, including type(*), is 
disconnected from that decision.

Cheers,
Bill


-- 
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