[MPI3 Fortran] Results of recent J3 Fortran meeting

Rolf Rabenseifner rabenseifner at hlrs.de
Thu Oct 21 08:05:14 CDT 2010


>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,*)

If I understood correctly, then this is CHOICE 3 in the mail below.

We have mainly to concentrate on assumed-size character strings
with assumed-length (i.e., the string length) 
and rank = 0 (single string variable), 
or rank = 1, or 2 (i.e. arrays of strings).

In all cases, the actual argument can be a fixed size array of strings,
or can be itself an assumed-size array.
Based on this, CHOICE 1 (i.e. the array size) makes no sense.
(Or did I misunderstood CHOICE 1?)

CHOICE 2: as far as I understand, it reflects the size of one CHARACTER.
This choice 2 makes no sense because with this information,
the called routine can not calculate the numbe of characters. 

Background:

a) CHARACTER typed arguments

   In MPI-2.2 specification this is:
   
   With one String:
   - MPI_PACK_EXTERNAL(DATAREP, ...)
      CHARACTER*(*) DATAREP

   - Same with
      MPI_PACK_EXTERNAL_SIZE(...), MPI_UNPACK_EXTERNAL(...),
      MPI_COMM_GET_NAME(...), MPI_COMM_SET_NAME(...),
      MPI_TYPE_GET_NAME(...), MPI_TYPE_SET_NAME(...), 
      MPI_WIN_GET_NAME(...), MPI_WIN_SET_NAME(...),
      MPI_ADD_ERROR_STRING(...), MPI_ERROR_STRING(...),
      MPI_GET_PROCESSOR_NAME(...), MPI_INFO_DELETE(...),
      MPI_INFO_GET_NTHKEY(...), MPI_INFO_GET_VALUELEN(...),
      MPI_CLOSE_PORT(...), MPI_COMM_ACCEPT(...),
      MPI_COMM_CONNECT(...), MPI_OPEN_PORT(...),
      MPI_FILE_DELETE(...), MPI_FILE_GET_VIEW(...),
      MPI_FILE_OPEN(...), MPI_FILE_SET_VIEW(...),
      MPI_REGISTER_DATAREP(...)

   With two strings:
   - MPI_INFO_SET(..., KEY, VALUE, ...)
      CHARACTER*(*) KEY, VALUE
   - Same with
      MPI_LOOKUP_NAME(...), MPI_PUBLISH_NAME(...),
      MPI_UNPUBLISH_NAME(...)

   With an array of strings:
   - MPI_COMM_SPAWN(COMMAND, ARGV, MAXPROCS, ...)
      CHARACTER*(*) COMMAND, ARGV(*)

   With a multi-dimensional array of strings:
   - MPI_COMM_SPAWN_MULTIPLE(COUNT, ARRAY_OF_COMMANDS, ARRAY_OF_ARGV, ...)
      CHARACTER*(*) ARRAY_OF_COMMANDS(*), ARRAY_OF_ARGV(COUNT, *)

   This is the basic concern of this email track.

   In all cases, the MPI routines need the information of LEN(...).
   

b) choice buffer arguments, i.e., with TYPE(*), DIMENSION(..)

   This should be discussed in the discussion about
   TYPE(*), DIMENSION(..) 


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



----- Original Message -----
> From: "N.M. Maclaren" <nmm1 at cam.ac.uk>
> To: "MPI-3 Fortran working group" <mpi3-fortran at lists.mpi-forum.org>
> Sent: Thursday, October 21, 2010 11:50:30 AM
> Subject: Re: [MPI3 Fortran] Results of recent J3 Fortran meeting
> On Oct 21 2010, Supalov, Alexander wrote:
> 
> > 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.
> 
> I am not sure of the level of MPI support, either! wchar_t was
> oppposed
> in both C90 and C99, for reasons I could describe. C++ has a somewhat
> different and more useful specification, which may or may not be fully
> compatible. And the next versions of the standards are introducing a
> completely new pair of extended character types and conversion
> functions
> for Unicode support - I believe that C++0X introduced them for
> compatibility
> with C1X, which may or may not ever become a standard!
> 
> God alone knows what MPI implementors make of that mess, because I
> have
> never touched the things, few scientists are interested, and I teach
> the
> kiddies to avoid that area like the plague. I have heard rumours that
> some people use the facility, in non-portable applications.
> 
> Regards,
> Nick Maclaren.
> 
> 
> _______________________________________________
> mpi3-fortran mailing list
> mpi3-fortran at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-fortran

-- 
Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner at hlrs.de
High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530
University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832
Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner
Nobelstr. 19, D-70550 Stuttgart, Germany . (Office: Allmandring 30)



More information about the mpiwg-fortran mailing list