[MPI3 Fortran] Results of recent J3 Fortran meeting

Bill Long longb at cray.com
Thu Oct 21 11:58:39 CDT 2010

Rolf Rabenseifner wrote:
>>From MPI view-point: 
> We clearly need to get exactly the information
> that would be returned by 
>   - LEN(dummy_arg) ..... in case of CHARACTER*(*) dummy_arg
>   - LEN(dummy_arg(1)) .. in case of CHARACTER*(*) dummy_arg(*)
>   - LEN(dummy_arg(1,1))  in case of CHARACTER*(*) dummy_arg(dim1,*)
> Note about the comment of Alexander Suplalov:
>   MPI_WCHAR has nothing to do with Fortran.
>   It clearly corresponds to C/C++ wchar_t.
>   There isn't a counterpart for Fortran.
>   There are currently no plans (i.e. no ticket) to 
>   any support for multibyte characters within the MPI Fortran interface.
> Rolf

I've lost track of the choice numbers, but if there is no need for 
characters other that C's char, then the simplest solution (for both the 
user and the TR) is to treat character arrays passed by descriptor like 
any other arrays passed by descriptor.  The type would be char, and the 
dimension information (dim[] member) corresponds to the Fortran 
dimensions. The elem_len field contains the array element length. 
Because sizeof(char) is 1, the character length parameter is equal to 
the elem_len value, so the character len value is directly available. 
(This approach is pretty common practice for Fortran descriptors 
already.)  The main change from the current F03 interop is that a 
character(*) dummy argument in an interface has to correspond to a C 
descriptor on the C side. (This edit is already included in the latest 
TR draft).  We also need to say that character(*) [and also character(n) 
where n>1] is now interoperable.


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