Neeraj,

The rationale is clearly explained in the MPI standard. Here is the relevant paragraph from section 7.3.2:

The ``in place'' operations are provided to reduce unnecessary memory motion by both the MPI implementation and by the user. Note that while the simple check of testing whether the send and receive buffers have the same address will work for some cases (e.g., MPI_ALLREDUCE), they are inadequate in others (e.g., MPI_GATHER, with root not equal to zero). Further, Fortran explicitly prohibits aliasing of arguments; the approach of using a special value to denote ``in place'' operation eliminates that difficulty.

  Thanks,
    george.

On Dec 11, 2007, at 6:13 AM, Neeraj Chourasia wrote:

Thanks  George,

But what is the need for user to specify it. The api can check the address of input buffers and output buffers. Is there some extra advantage of MPI_IN_PLACE over automatically detecting it using pointers?

-Neeraj

On Tue, 11 Dec 2007 06:10:06 -0500 Open MPI Users wrote

Neeraj,



MPI_IN_PLACE is defined by the MPI standard in order to allow the

users to specify that the input and output buffers for the collectives

are the same. Moreover, not all collectives support MPI_IN_PLACE and

for those that support it some strict rules apply. Please read the

collective section in the MPI standard to see all the restrictions.



Thanks,

george.



On Dec 11, 2007, at 5:56 AM, Neeraj Chourasia wrote:



> Hello everyone,

>

> While going through collective algorithms, I came across

> preprocessor directive MPI_IN_PLACE which is (void *)1. Its always

> being compared against source buffer(sbuf). My question is when

> MPI_IN_PLACE == sbuf condition would be true. As far as i

> understand, sbuf is the address of source buffer, which every node

> has to transfer to remaining nodes based on recursive doubling or

> say bruck algo. And it can never be equal to (void *)1. Any help is

> appreciated.

>

> Regards

> Neeraj

>

> _______________________________________________

> users mailing list

> us...@open-mpi.org

> http://www.open-mpi.org/mailman/listinfo.cgi/users






_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to