From: "Bronis R. de Supinski" Date: January 22, 2008 4:32:16 PM CST To: "mpi-21@mpi-forum.org" Subject: RE: [mpi-21] Proposal EH2 & MPI_INPLACE Reply-To: mpi-21@XXXXXXXXXXXXX Erez: The issue at hand was not whether MPI_INPLACE should be const, it's whether the send buffer should be const for operations that use MPI_INPLACE for the receive buffer. The problem is that the send buffer is modified. Bronis On Tue, 22 Jan 2008, Erez Haba wrote: > I don't see the problem, would you care to elaborate? > > As far as I know the users specifies MPI_IN_PLACE as the sendbuf > and the real read/write buff to the recvbuff. Thus the > implementation read/writes to the recvbuf and not to the > MPI_IN_PLACE value. > > As a complement to the const proposal we should actually define > MPI_IN_PLACE and a pointer to const (e.g., '#define MPI_IN_PLACE > (const void*)-1'), which will help people avoid making the mistake > of specifying MPI_IN_PLACE to the recv buffer. > > Thanks, > .Erez > > -----Original Message----- > From: owner-mpi-21@mpi-forum.org [mailto:owner-mpi-21@mpi- > forum.org] On Behalf Of Dries Kimpe > Sent: Tuesday, January 22, 2008 12:40 PM > To: mpi-21@mpi-forum.org > Subject: [mpi-21] Proposal EH2 & MPI_INPLACE > > There is a problem with adding const to the send buffer of some of the > collective operations: > > Because of MPI_IN_PLACE, in some cases, the send buffer will not be > read-only but read-write. > > Example: > MPI_Allreduce > > Affected: > All collectives that support MPI_IN_PLACE --AND-- modify the data > in the send > buffer. > > Solution: > Drop the const from the send buffer argument of the affected functions > > Dries > >