[mvapich-discuss] Error in MPI_Scatter: 'Buffers must not be aliased'

Akshay Venkatesh venkatesh.19 at buckeyemail.osu.edu
Sat Jun 21 18:43:43 EDT 2014


Mehmet,

This error occurred because there was an attempt to perform a memcpy from
source to destination with source = destination at the root. This occurs
when you pass overlapping memory regions to sendbuf and recvbuf arguments.
The MPI standard says the following about the use of MPI_IN_PLACE with
MPI_Scatter on an intracommunicator.

"""
The “in place” option for intracommunicators is specified by passing
MPI_IN_PLACE as
the value of recvbuf at the root. In such a case, recvcount and recvtype
are ignored, and
root “sends” no data to itself. The scattered vector is still assumed to
contain n segments,
where n is the group size; the root-th segment, which root should “send to
itself,” is not
moved.
"""

I believe this is your intention.

Also, the standard mentions:
"""
The send buffer is ignored for all non-root processes.
"""

I've attached a copy of the changes required to your program with this
mail. I saw the following output with the fix

bash-4.1$ ../install/bin/mpirun_rsh -np 2 node001 node002 ./scatter_fixed
[rank=0][ 0 0 ]
[rank=1][ 1 1 ]

Hope this helps.

-- 
- Akshay

http://www.cse.ohio-state.edu/~akshay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20140621/a2ce6476/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MPI_Scatter_Fixed.c
Type: text/x-csrc
Size: 1061 bytes
Desc: not available
URL: <http://mailman.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20140621/a2ce6476/attachment-0001.bin>


More information about the mvapich-discuss mailing list