[Mpi-22] MPI-2.1 ambiguity?

Richard Treumann treumann at [hidden]
Thu Jul 17 10:04:50 CDT 2008


To me this debate seems trivial but perhaps that is because for IBM MPI the
value of a predefined datatype handle is a 4 byte integer constant and
MPI_INT is a different constant than MPI_INTEGER. Putting MPI_INT in mpif.h
is easy and it has been there since day one. MPI_TYPE_C2F( MPI_INT )has no
work to do.

Are there MPI implementations that do something that makes it complicated
to satisfy the following statements?

1) All predefined datatype handles must be defined in all languages (C, C++
and Fortran)
2) The value of a C handle as defined in mpif.h must be that same as is
returned when MPI_TYPE_C2F( handle ) is used in C
3) Having a C handle in mpif.h does not imply that the Fortran compiler
supports a corresponding Fortran datatype

It could be argued that point 3 is too obvious to mention.


Dick Treumann  -  MPI Team/TCEM
IBM Systems & Technology Group
Dept 0lva / MS P963 -- 2455 South Road -- Poughkeepsie, NY 12601
Tele (845) 433-7846         Fax (845) 433-8363


mpi-22-bounces_at_[hidden] wrote on 07/17/2008 10:03:35 AM:

> To make this perfectly clear, should the standard state that the
> values of the predefined datatypes from another language are exactly
> the same as the value produced by the handle conversion function?
>  E.g., in Fortran, the value of MPI_INT is what you would get from
> MPI_TYPE_C2F( MPI_INT )  (where MPI_INT is the C version).  It
> should also state that just because Fortran defines MPI_LONG_LONG,
> that does not imply that Fortran support an integer type that
> corresponds to the C long long type.
>
> Bill
>
> On Jul 17, 2008, at 4:03 AM, Rolf Rabenseifner wrote:
>
> Hi all,
>
> The argument-chain was:
>
> William Gropp wrote:
> One piece of relevant text in MPI 2.0 is in section 4.12.6 (in
> MPI-2.0) says that "All predefined datatypes can be used in
> datatype constructors in any language."
> [....]
>
> This text is supported also by:
> MPI-2.0 Chap. 10.1.6 page 276 and
> MPI-2.0 Annex B.2, page 344 define for all Fortran predefined
> datatype handles as C++ counter-part.
>
> In the meeting, there was a consensus (?) that it is a bug
> if an MPI implementation does not support, e.g. MPI_INT
> in the mpif.h Fortran header file.
> (This bug can be found, e.g., in MPICH-2 and will be fixed,
> when I understood correctly)
>
> The value (not the name!!) of MPI_INT in mpif.h and mpi.h may be
> different, as stated already in MPI-2.0, Sect. 4.12.9.
> MPI_INT from C mpi.h cannot be used in a Fortran CALL MPI_SEND(...).
> You need to convert, or you must use MPI_INT from Fortran mpif.h.
>
> (I.e. one may distiguish between mixed languages in
> one MPI executable [addressed by MPI-2.0 Section 4.12.9],
> and sending a message from a Fortran MPI executable to a C MPI
> executable and vice versa [see MPI 2.0 Section 4.12.6].)
>
> Because this is already "clearly" defined in MPI-2.0,
> you will not find any remark about this in the Change-Log
> of MPI-2.1.
>
> MPI-2.2 may make it more clear in the revisiting of datatypes.
>
> Best regards
> Rolf
>
> On Thu, 17 Jul 2008 10:20:28 +0200
>   Hubert Ritzdorf <ritzdorf_at_it.neclab.eu> wrote:
> No, we didn't have them. The request to provide all C datatypes in
> Fortran was specified in one of the last meetings. When I remember
> correctly, it was specified in the last meeting in Chicago or
> the meeting before (I think it was specified together with item 33
> of the change log). I implemented it together with the changes
> for MPI 2.1 since I assumed that it was contained also in the
> change log. After your mail, I recognized that it is only implicitly
> mentioned by item 33.
>
> Hubert
>
> Jeff Squyres wrote:
> What does NEC MPI do -- do you have MPI_INT and MPI_FLOAT (etc.) in
> mpif.h?
>
> On Jul 16, 2008, at 12:57 PM, Hubert Ritzdorf wrote:
>
> What's about the C++ datatypes for complex ?
> MPI_COMPLEX and MPI_Double_Complex are already defined for Fortran
> datatypes. The complex Fortran datatypes  within C++  have a special
> name in order to avoid a name collision.
>
> Hubert
>
> William Gropp wrote:
> One piece of relevant text in MPI 2.0 is in section 4.12.6 (in
> MPI-2.0) says that "All predefined datatypes can be used in datatype
> constructors in any language."  However, the example uses
> MPI_Type_f2c ton convert the Fortran handle to the C version before
> passing it into the MPI_Type_create_struct routine, so this text
> could be interpreted as allowing the use of those datatypes through
> the handle conversion mechanism without requiring them to be defined
> in each languages header file.  Presumably the requirement is that
> they be predefined with the value that you'd get from the handle
> conversion function?
>
> Bill
>
> On Jul 16, 2008, at 8:18 AM, Hubert Ritzdorf wrote:
>
> Hi,
>
> when I remember correctly, it was decided to provide the C MPI
> datatypes
> in Fortran since
> the Fortran datatypes are supported in C and C++.
>
> Hubert
>
> Jeff Squyres wrote:
> I will file a proposal about this if there is a problem, but I
> wanted
> to ask the group before I did so.  In the changelog for MPI-2.1:
>
> 2. Section 3.2.2 on page 27, Section 16.1.6 on page 453, and Annex
> A.1
> on page 491.
> MPI_LONG_LONG_INT, MPI_LONG_LONG (as synonym),
> MPI_UNSIGNED_LONG_LONG,
> MPI_SIGNED_CHAR, and MPI_WCHAR are moved from optional to official
> and they
> are therefore defined for all three language bindings.
>
> Note that it says that these C datatype names must be in all three
> language bindings.
>
> Are C MPI datatypes supposed to be available in Fortran?  I looked
> in
> mpif.h for Open MPI, MPICH2, HP MPI, and Intel MPI, and I didn't
> see C
> MPI datatypes in there (e.g., MPI_INT and MPI_FLOAT).
>
> So:
>
> - is there language somewhere in MPI that says that C datatypes are
> not supposed to be in mpif.h? (and therefore the MPI-2.1 changelog
> is
> wrong)
>
> or
>
> - are all 4 of the above MPI's wrong for not including the C
> datatypes
> in mpif.h?
>
> --Jeff Squyres
> Cisco Systems
>
> _______________________________________________
> mpi-22 mailing list
> mpi-22_at_[hidden] <mailto:mpi-22_at_[hidden]>
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22
>
> <smime.p7s><ATT00001.txt>
>
> William Gropp
> Paul and Cynthia Saylor Professor of Computer Science
> University of Illinois Urbana-Champaign
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mpi-22 mailing list
> mpi-22_at_[hidden]
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22
>
> _______________________________________________
> mpi-22 mailing list
> mpi-22_at_[hidden]
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22
>
> --Jeff Squyres
> Cisco Systems
>
> _______________________________________________
> mpi-22 mailing list
> mpi-22_at_[hidden]
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22
>
> Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner_at_[hidden]
> 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)
> _______________________________________________
> mpi-22 mailing list
> mpi-22_at_[hidden]
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22
>
> William Gropp
> Paul and Cynthia Saylor Professor of Computer Science
> University of Illinois Urbana-Champaign
>
> _______________________________________________
> mpi-22 mailing list
> mpi-22_at_[hidden]
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22




* 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpi-22/attachments/20080717/fb4f686c/attachment.html>


More information about the Mpi-22 mailing list