Skip to content

Conversation

jjhursey
Copy link
Member

MPI_Allgatherv with MPI_IN_PLACE reads data from wrong location.

They were locating the MPI_IN_PLACE send buffer as

         send_buf = (char*)rbuf;
         for (i = 0; i < rank; ++i) {
             send_buf += ((ptrdiff_t)rcounts[i] * extent);
         }

when it should be

         send_buf = (char*)rbuf;
         send_buf += ((ptrdiff_t)disps[rank] * extent);

because disps[] specifies where things are in the v-style buffers.

Signed-off-by: Joshua Hursey jhursey@us.ibm.com

MPI_Allgatherv with MPI_IN_PLACE reads data from wrong location.

They were locating the MPI_IN_PLACE send buffer as
```c
         send_buf = (char*)rbuf;
         for (i = 0; i < rank; ++i) {
             send_buf += ((ptrdiff_t)rcounts[i] * extent);
         }
```
when it should be
```c
         send_buf = (char*)rbuf;
         send_buf += ((ptrdiff_t)disps[rank] * extent);
```
because disps[] specifies where things are in the v-style buffers.

Signed-off-by: Joshua Hursey <jhursey@us.ibm.com>
@jjhursey jjhursey removed the request for review from markalle January 26, 2017 20:21
@jjhursey jjhursey merged commit 0408c11 into open-mpi:master Jan 26, 2017
@jjhursey jjhursey deleted the fix/ibm/base-allgatherv branch January 26, 2017 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants