[MPI3 Fortran] Results of recent J3 Fortran meeting
Supalov, Alexander
alexander.supalov at intel.com
Thu Oct 21 02:21:44 CDT 2010
Multibyte characters are supported by MPI in some sense (see MPI_WCHAR). Not sure of the level of Fortran support, though- either desired or provided.
-----Original Message-----
From: mpi3-fortran-bounces at lists.mpi-forum.org [mailto:mpi3-fortran-bounces at lists.mpi-forum.org] On Behalf Of Malcolm Cohen
Sent: Thursday, October 21, 2010 2:05 AM
To: MPI-3 Fortran working group
Subject: Re: [MPI3 Fortran] Results of recent J3 Fortran meeting
Hi Craig,
> The short answer is that a revised version of the paper passed (see
> attachments). The longer answer is that there was disagreements on how
> assumed size characters should be implemented. I've also attached a file with
> two C functions showing the two choices. Hopefully these example are mostly
> correct, I haven't had a chance to test them yet.
Nitpick: that's "assumed length", "assumed size" is about arrays. I know this
terminology is confusing, with assumed size, shape, length, rank, type ... but
since the paper does both assumed length (for characters), and also does passing
assumed-size arrays to assumed-rank dummies, we need to get the terms right to
avoid even more confusion!
Anyway, there are three choices described in 10-237r2 (one with edits and two
without), and the one you dropped was my favourite one... viz the one that
doesn't mix together the size of a character with the length of a string - this
matters when you have multibyte characters; that's probably unimportant to MPI,
but it is certainly important to other audiences.
If "choice 1" isn't taken, there is certainly more work required by J3 to sort
out the technical details of choice 2 or choice 3. Unfortunately we ran out of
time to produce edits for all three versions for comparison.
Here is fstr_len modified to include all three choices.
int fstr_len(CFI_cdesc_t * desc)
{
int err = -1; /* this error code represents all errors */
/* only support character type */
if (desc->type != CFI_type_char) return err;
#ifdef CHOICE_1
/* only support strings with Fortran rank 0 */
if (desc->rank != 1) return err;
/* character length stored in dim[0] */
return desc->dim[0].extent;
#else
/* only support strings with Fortran rank 0 */
if (desc->rank != 0) return err;
#ifdef CHOICE_2
/* character length stored in elem_len */
return desc->elem_len;
#else
/* character length stored in string_len */
return desc->string_len;
#endif
#endif
}
Cheers,
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
_______________________________________________
mpi3-fortran mailing list
mpi3-fortran at lists.mpi-forum.org
http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-fortran
--------------------------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
More information about the mpiwg-fortran
mailing list