Newsgroups: comp.parallel.mpi From: gropp@godzilla.mcs.anl.gov (William Gropp) Subject: Re: MPI_gatherv Organization: MCS, Argonne National Laboratory Date: Fri, 15 May 1998 17:44:4 GMT Message-ID: <8952542441544@godzilla.mcs.anl.gov> In article <355B0EB4.D72967C8@dl.ac.uk>, Ian Bush wrote: >Hi All, > > I'm hoping that some standards lawyer might be able to confirm >my understanding of something ... > > The basic question is can you have sendcount=0 in MPI_gatherv, >and if you can what corresponding values you should have for displs ? >As I read it IF sendcount=0 is allowed, and it is not explicitly >stated to be prohibited, then any old value for the relevant displs >will do, e.g. 0, because of the sentence > >"The specification of counts, types and displacements should not cause >any location on the root to be written more than once" > >as if sendcount=0 for that processor no writing will occur. > > I'm asking because for various perverse reasons I want to gather >from a subset of the communicators processors. Yes, maybe I am being >a bit lazy, MPI_comm_split to make the communicator with the interesting >processors in it, gatherv then free the new communicator might be >better, >but a new communicator for just one operation seems a little bit ugly to >me, hence the question, > >Ian Yes, you should be able to do this. In fact, in the MPI-2 standard, this sort of approach is used as an illustation of how to achieve the "half duplex" version of the intercommunicator collective operations (e.g., advice to users for MPI_Alltoall, section 7.3.2, in MPI-2). Bill