[Mpi-22] MPI-2.1 ambiguity?

Rolf Rabenseifner rabenseifner at [hidden]
Thu Jul 17 04:03:39 CDT 2008



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)



More information about the Mpi-22 mailing list