Newsgroups: comp.parallel.mpi
From: A Gordon Smith <smith@epcc.ed.ac.uk>
Subject: Re: MPI_Scatterv
Organization: Edinburgh Parallel Computing Centre
Date: Wed, 18 Dec 1996 18:09:28 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <32B83358.167EB0E7@epcc.ed.ac.uk>

hejc@apap2.pap.univie.ac.at wrote:
> 
> Hi,
>  I have the following question concerning MPI_Scatterv.
> 
>         MPI_Scatterv( sendbuf, sendcounts, disps,
>                         sendtype, recvbuf, recvcount,
>                         recvtype, root, comm )
> Somebody told me that the 'recvcount' argument must have
> the same value for all processes except the root.
> Is this true?
> It didn't find something about this in the MPI Standard.
> 
>         Thanks in advance
> 
>                 Gerhard


Hello Gerhard,

I think the relevant passage from the standard (v1.1)
is p.107 l.20-25:

  The type signature implied by sendcount[i], sendtype
  at the root must be equal to the type signature implied
  by recvcount, recvtype at process i (however the type
  maps may be different). This implies that the amount of
  data sent must be equal to the amount of data received,
  pairwise between each process and the root. Distinct type
  maps between the sender and receiver are still allowed.

The terms "type signature" and "type map" are defined
in Section 3.12 "Derived datatypes". Basically the above
requires that the number and basic type of the data sent
from root to recipient must match up. If you are simply
using basic MPI datatypes, eg. MPI_INTEGER, then it is true
that the recvcounts must be the same; if you are using
differing derived datatypes then the recvcounts may be 
different 

Be aware that the root also receives data from itself,
so it is necessary that recvcount be correct there as well.

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 -=-=- A. Gordon Smith -=- Edinburgh Parallel Computing Centre -=-=-
 =- http://www.epcc.ed.ac.uk/~smith -=- Phone +44 (0)131 650 6712 -=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

