Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Why? MPI_Scatter problem
From: Riccardo Murri (riccardo.murri_at_[hidden])
Date: 2010-12-13 11:48:48


On Mon, Dec 13, 2010 at 4:57 PM, Kechagias Apostolos
<pasxal.antix_at_[hidden]> wrote:
> I have the code that is in the attachment.
> Can anybody explain how to use scatter function?

MPI_Scatter receives the data in the initial segment of the given
buffer. (The receiving buffer needs to be 1/Nth of the send buffer.)

So, in your code, it's always start=0 and end=(N1-1) independently of the rank.

Best regards,
Riccardo