<html><body>
<p>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. <tt>MPI_TYPE_C2F( MPI_INT )</tt>has no work to do.<br>
<br>
Are there MPI implementations that do something that makes it complicated to satisfy the following statements?<br>
<br>
1) All predefined datatype handles must be defined in all languages (C, C++ and Fortran)<br>
2) The value of a C handle as defined in mpif.h must be that same as is returned when <tt>MPI_TYPE_C2F( </tt>handle ) is used in C<br>
3) Having a C handle in mpif.h does not imply that the Fortran compiler supports a corresponding Fortran datatype<br>
<br>
It could be argued that point 3 is too obvious to mention.<br>
<br>
<br>
Dick Treumann - MPI Team/TCEM <br>
IBM Systems & Technology Group<br>
Dept 0lva / MS P963 -- 2455 South Road -- Poughkeepsie, NY 12601<br>
Tele (845) 433-7846 Fax (845) 433-8363<br>
<br>
<br>
<tt>mpi-22-bounces@lists.mpi-forum.org wrote on 07/17/2008 10:03:35 AM:<br>
<br>
> To make this perfectly clear, should the standard state that the <br>
> values of the predefined datatypes from another language are exactly<br>
> the same as the value produced by the handle conversion function? <br>
> E.g., in Fortran, the value of MPI_INT is what you would get from <br>
> MPI_TYPE_C2F( MPI_INT ) (where MPI_INT is the C version). It <br>
> should also state that just because Fortran defines MPI_LONG_LONG, <br>
> that does not imply that Fortran support an integer type that <br>
> corresponds to the C long long type.</tt><br>
<tt>> <br>
> Bill</tt><br>
<tt>> <br>
> On Jul 17, 2008, at 4:03 AM, Rolf Rabenseifner wrote:</tt><br>
<tt>> <br>
> Hi all,</tt><br>
<tt>> <br>
> The argument-chain was:</tt><br>
<tt>> <br>
> William Gropp wrote:</tt><br>
<tt>> One piece of relevant text in MPI 2.0 is in section 4.12.6 (in</tt><br>
<tt>> MPI-2.0) says that "All predefined datatypes can be used in</tt><br>
<tt>> datatype constructors in any language."</tt><br>
<tt>> [....]</tt><br>
<tt>> <br>
> This text is supported also by:</tt><br>
<tt>> MPI-2.0 Chap. 10.1.6 page 276 and</tt><br>
<tt>> MPI-2.0 Annex B.2, page 344 define for all Fortran predefined</tt><br>
<tt>> datatype handles as C++ counter-part.</tt><br>
<tt>> <br>
> In the meeting, there was a consensus (?) that it is a bug</tt><br>
<tt>> if an MPI implementation does not support, e.g. MPI_INT</tt><br>
<tt>> in the mpif.h Fortran header file.</tt><br>
<tt>> (This bug can be found, e.g., in MPICH-2 and will be fixed,</tt><br>
<tt>> when I understood correctly)</tt><br>
<tt>> <br>
> The value (not the name!!) of MPI_INT in mpif.h and mpi.h may be</tt><br>
<tt>> different, as stated already in MPI-2.0, Sect. 4.12.9.</tt><br>
<tt>> MPI_INT from C mpi.h cannot be used in a Fortran CALL MPI_SEND(...).</tt><br>
<tt>> You need to convert, or you must use MPI_INT from Fortran mpif.h.</tt><br>
<tt>> <br>
> (I.e. one may distiguish between mixed languages in</tt><br>
<tt>> one MPI executable [addressed by MPI-2.0 Section 4.12.9],</tt><br>
<tt>> and sending a message from a Fortran MPI executable to a C MPI</tt><br>
<tt>> executable and vice versa [see MPI 2.0 Section 4.12.6].)</tt><br>
<tt>> <br>
> Because this is already "clearly" defined in MPI-2.0,</tt><br>
<tt>> you will not find any remark about this in the Change-Log</tt><br>
<tt>> of MPI-2.1.</tt><br>
<tt>> <br>
> MPI-2.2 may make it more clear in the revisiting of datatypes.</tt><br>
<tt>> <br>
> Best regards</tt><br>
<tt>> Rolf</tt><br>
<tt>> <br>
> On Thu, 17 Jul 2008 10:20:28 +0200</tt><br>
<tt>> Hubert Ritzdorf <ritzdorf@it.neclab.eu> wrote:</tt><br>
<tt>> No, we didn't have them. The request to provide all C datatypes in</tt><br>
<tt>> Fortran was specified in one of the last meetings. When I remember</tt><br>
<tt>> correctly, it was specified in the last meeting in Chicago or</tt><br>
<tt>> the meeting before (I think it was specified together with item 33</tt><br>
<tt>> of the change log). I implemented it together with the changes</tt><br>
<tt>> for MPI 2.1 since I assumed that it was contained also in the</tt><br>
<tt>> change log. After your mail, I recognized that it is only implicitly</tt><br>
<tt>> mentioned by item 33.</tt><br>
<tt>> <br>
> Hubert</tt><br>
<tt>> <br>
> Jeff Squyres wrote:</tt><br>
<tt>> What does NEC MPI do -- do you have MPI_INT and MPI_FLOAT (etc.) in</tt><br>
<tt>> mpif.h?</tt><br>
<tt>> <br>
> On Jul 16, 2008, at 12:57 PM, Hubert Ritzdorf wrote:</tt><br>
<tt>> <br>
> What's about the C++ datatypes for complex ?</tt><br>
<tt>> MPI_COMPLEX and MPI_Double_Complex are already defined for Fortran</tt><br>
<tt>> datatypes. The complex Fortran datatypes within C++ have a special</tt><br>
<tt>> name in order to avoid a name collision.</tt><br>
<tt>> <br>
> Hubert</tt><br>
<tt>> <br>
> William Gropp wrote:</tt><br>
<tt>> One piece of relevant text in MPI 2.0 is in section 4.12.6 (in</tt><br>
<tt>> MPI-2.0) says that "All predefined datatypes can be used in datatype</tt><br>
<tt>> constructors in any language." However, the example uses</tt><br>
<tt>> MPI_Type_f2c ton convert the Fortran handle to the C version before</tt><br>
<tt>> passing it into the MPI_Type_create_struct routine, so this text</tt><br>
<tt>> could be interpreted as allowing the use of those datatypes through</tt><br>
<tt>> the handle conversion mechanism without requiring them to be defined</tt><br>
<tt>> in each languages header file. Presumably the requirement is that</tt><br>
<tt>> they be predefined with the value that you'd get from the handle</tt><br>
<tt>> conversion function?</tt><br>
<tt>> <br>
> Bill</tt><br>
<tt>> <br>
> On Jul 16, 2008, at 8:18 AM, Hubert Ritzdorf wrote:</tt><br>
<tt>> <br>
> Hi,</tt><br>
<tt>> <br>
> when I remember correctly, it was decided to provide the C MPI</tt><br>
<tt>> datatypes</tt><br>
<tt>> in Fortran since</tt><br>
<tt>> the Fortran datatypes are supported in C and C++.</tt><br>
<tt>> <br>
> Hubert</tt><br>
<tt>> <br>
> Jeff Squyres wrote:</tt><br>
<tt>> I will file a proposal about this if there is a problem, but I</tt><br>
<tt>> wanted</tt><br>
<tt>> to ask the group before I did so. In the changelog for MPI-2.1:</tt><br>
<tt>> <br>
> 2. Section 3.2.2 on page 27, Section 16.1.6 on page 453, and Annex</tt><br>
<tt>> A.1</tt><br>
<tt>> on page 491.</tt><br>
<tt>> MPI_LONG_LONG_INT, MPI_LONG_LONG (as synonym),</tt><br>
<tt>> MPI_UNSIGNED_LONG_LONG,</tt><br>
<tt>> MPI_SIGNED_CHAR, and MPI_WCHAR are moved from optional to official</tt><br>
<tt>> and they</tt><br>
<tt>> are therefore defined for all three language bindings.</tt><br>
<tt>> <br>
> Note that it says that these C datatype names must be in all three</tt><br>
<tt>> language bindings.</tt><br>
<tt>> <br>
> Are C MPI datatypes supposed to be available in Fortran? I looked</tt><br>
<tt>> in</tt><br>
<tt>> mpif.h for Open MPI, MPICH2, HP MPI, and Intel MPI, and I didn't</tt><br>
<tt>> see C</tt><br>
<tt>> MPI datatypes in there (e.g., MPI_INT and MPI_FLOAT).</tt><br>
<tt>> <br>
> So:</tt><br>
<tt>> <br>
> - is there language somewhere in MPI that says that C datatypes are</tt><br>
<tt>> not supposed to be in mpif.h? (and therefore the MPI-2.1 changelog</tt><br>
<tt>> is</tt><br>
<tt>> wrong)</tt><br>
<tt>> <br>
> or</tt><br>
<tt>> <br>
> - are all 4 of the above MPI's wrong for not including the C</tt><br>
<tt>> datatypes</tt><br>
<tt>> in mpif.h?</tt><br>
<tt>> <br>
> --Jeff Squyres</tt><br>
<tt>> Cisco Systems</tt><br>
<tt>> <br>
> _______________________________________________</tt><br>
<tt>> mpi-22 mailing list</tt><br>
<tt>> mpi-22@lists.mpi-forum.org <<a href="mailto:mpi-22@lists.mpi-forum.org">mailto:mpi-22@lists.mpi-forum.org</a>></tt><br>
<tt>> <a href="http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22">http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22</a></tt><br>
<tt>> <br>
> <smime.p7s><ATT00001.txt></tt><br>
<tt>> <br>
> William Gropp</tt><br>
<tt>> Paul and Cynthia Saylor Professor of Computer Science</tt><br>
<tt>> University of Illinois Urbana-Champaign</tt><br>
<tt>> <br>
> ------------------------------------------------------------------------</tt><br>
<tt>> <br>
> _______________________________________________</tt><br>
<tt>> mpi-22 mailing list</tt><br>
<tt>> mpi-22@lists.mpi-forum.org</tt><br>
<tt>> <a href="http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22">http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22</a></tt><br>
<tt>> <br>
> _______________________________________________</tt><br>
<tt>> mpi-22 mailing list</tt><br>
<tt>> mpi-22@lists.mpi-forum.org</tt><br>
<tt>> <a href="http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22">http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22</a></tt><br>
<tt>> <br>
> --Jeff Squyres</tt><br>
<tt>> Cisco Systems</tt><br>
<tt>> <br>
> _______________________________________________</tt><br>
<tt>> mpi-22 mailing list</tt><br>
<tt>> mpi-22@lists.mpi-forum.org</tt><br>
<tt>> <a href="http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22">http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22</a></tt><br>
<tt>> <br>
> Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner@hlrs.de</tt><br>
<tt>> High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530</tt><br>
<tt>> University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832</tt><br>
<tt>> Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner</tt><br>
<tt>> Nobelstr. 19, D-70550 Stuttgart, Germany . (Office: Allmandring 30)</tt><br>
<tt>> _______________________________________________</tt><br>
<tt>> mpi-22 mailing list</tt><br>
<tt>> mpi-22@lists.mpi-forum.org</tt><br>
<tt>> <a href="http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22">http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22</a></tt><br>
<tt>> <br>
> William Gropp</tt><br>
<tt>> Paul and Cynthia Saylor Professor of Computer Science</tt><br>
<tt>> University of Illinois Urbana-Champaign</tt><br>
<tt>> <br>
> _______________________________________________<br>
> mpi-22 mailing list<br>
> mpi-22@lists.mpi-forum.org<br>
> <a href="http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22">http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22</a><br>
</tt></body></html>