[mvapich-discuss] Error in MPI_Scatter: 'Buffers must not be aliased'
Mehmet Belgin
mehmet.belgin at oit.gatech.edu
Sat Jun 21 20:25:39 EDT 2014
Hi Akshay,
This helps a lot, thanks for your clarification. This rule can be a bit
counter intuitive for programmers, but an explicit in-place makes sense.
I am surprised that OpenMPI silently ignores something that is clear in
the MPI standard.
Thank you!
-Mehmet
On 06/21/2014 06:43 PM, Akshay Venkatesh wrote:
> 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
> <http://www.cse.ohio-state.edu/%7Eakshay/>
>
>
> _______________________________________________
> mvapich-discuss mailing list
> mvapich-discuss at cse.ohio-state.edu
> http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
--
=========================================
Mehmet Belgin, Ph.D. (mehmet.belgin at oit.gatech.edu)
Scientific Computing Consultant | OIT - Academic and Research Technologies
Georgia Institute of Technology
258 Fourth Street, Rich Building, Room 326
Atlanta, GA 30332-0700
Office: (404) 385-0665
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20140621/903d06dd/attachment.html>
More information about the mvapich-discuss
mailing list