[Mpi-22] Ticket #46: Add const Keyword to the C bindings- implementation
Underwood, Keith D
keith.d.underwood at [hidden]
Thu Mar 12 16:03:15 CDT 2009
I didn't think that typical MPI implementations over IB copied the data for large messages (as opposed to the bounce buffers for small messages).
If you are going to have to cast away the const, what is the point of putting it in? In fact, if you have to cast away the const, aren't you violating your contract with the compiler? Should this change be rolled out from the bottom up? i.e. common low-level APIs first and then MPI?
Keith
>-----Original Message-----
>From: mpi-22-bounces_at_[hidden] [mailto:mpi-22-bounces_at_lists.mpi-
>forum.org] On Behalf Of Erez Haba
>Sent: Thursday, March 12, 2009 2:10 PM
>To: MPI 2.2
>Subject: Re: [Mpi-22] Ticket #46: Add const Keyword to the C bindings-
>implementation
>
>Possibly you'll have to cast.
>There are few interfaces that take const for send buffer (like sockets).
>In other cases you copy the buffer (like with IB) which keeps the const
>property.
>
>Thanks,
>.Erez
>
>-----Original Message-----
>From: mpi-22-bounces_at_[hidden] [mailto:mpi-22-bounces_at_lists.mpi-
>forum.org] On Behalf Of Underwood, Keith D
>Sent: Thursday, March 12, 2009 12:05 PM
>To: MPI 2.2
>Subject: Re: [Mpi-22] Ticket #46: Add const Keyword to the C bindings-
>implementation
>
>It would seem like const would eventually have to be cast away for most
>lower level interfaces. Portals, Elan, IB Verbs, and as best I can tell MX
>don't have const on their send buffers...
>
>Keith
>
>>-----Original Message-----
>>From: mpi-22-bounces_at_[hidden] [mailto:mpi-22-bounces_at_lists.mpi-
>>forum.org] On Behalf Of Erez Haba
>>Sent: Thursday, March 12, 2009 12:44 PM
>>To: MPI 2.2
>>Subject: Re: [Mpi-22] Ticket #46: Add const Keyword to the C bindings-
>>implementation
>>
>>No, it's not being cast away (although it is a quick way for you to
>>implement it).
>>In MPICH2 implementation it trickles down to the lower functions. There
>are
>>very few places where the const is being cast away because ticket #46 does
>>not to break backward compatibility.
>>For example, when the user function is called (const was not added to the
>>MPI_User_function) the implementation must cast away const from the send
>>buffer before calling the user function.
>>
>>Thanks,
>>.Erez
>>
>>-----Original Message-----
>>From: mpi-22-bounces_at_[hidden] [mailto:mpi-22-bounces_at_lists.mpi-
>>forum.org] On Behalf Of Jeff Squyres
>>Sent: Thursday, March 12, 2009 11:34 AM
>>To: MPI 2.2
>>Subject: Re: [Mpi-22] Ticket #46: Add const Keyword to the C bindings-
>>implementation
>>
>>More importantly, how is const handled? Is it just cast away inside
>>the MPI library?
>>
>>
>>On Mar 12, 2009, at 2:34 PM, Underwood, Keith D wrote:
>>
>>> Since the main purpose of an implementation for something like
>>> adding const is to see how invasive the change is, would it be
>>> possible to get a diff against the trees that these were created from?
>>>
>>> Thanks,
>>> Keith
>>>
>>> From: mpi-22-bounces_at_[hidden] [mailto:mpi-22-
>>bounces_at_[hidden]
>>> ] On Behalf Of Erez Haba
>>> Sent: Thursday, March 12, 2009 12:24 PM
>>> To: MPI 2.2
>>> Subject: [Mpi-22] Ticket #46: Add const Keyword to the C bindings -
>>> implementation
>>>
>>>
>>> Implementation for ticket #46 is now available from ANL (thanks Pavan)
>>>
>>>
>>> tarballs
>>>
>>http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/nightly
>/
>>const
>>>
>>>
>>> thanks,
>>> .Erez
>>>
>>> _______________________________________________
>>> 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
>>
>>
>>_______________________________________________
>>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
>
>
>_______________________________________________
>mpi-22 mailing list
>mpi-22_at_[hidden]
>http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-22
More information about the Mpi-22
mailing list