It's compiler specific I think. I've done this with OpenMPI no problem, however on one another cluster with ifort I've gotten error messages about not using MPI_IN_PLACE. So I think if it compiles, it should work fine.
On Thu, Sep 16, 2010 at 10:01 AM, Tom Rosmond <rosm...@reachone.com> wrote: > I am working with a Fortran 90 code with many MPI calls like this: > > call mpi_gatherv(x,nsize(rank+1), > mpi_real,x,nsize,nstep,mpi_real,root,mpi_comm_world,mstat) > > 'x' is allocated on root to be large enough to hold the results of the > gather, other arrays and parameters are defined correctly, and the code > runs as it should. However, I am concerned that having the same send > and receive buffer on root is a violation of the MPI standard. Am I > correct? I am aware of the MPI_IN_PLACE feature that can be used in > this situation, by defining it as the send buffer at root. > > The fact that the code as written seems to work on most system we run on > (some with OpenMPI, some with proprietary MPI's) indicates that in spite > of the standard, implementations allow it. Is this correct, or are we > just lucky. > > T. Rosmond > > > > _______________________________________________ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users > -- David Zhang University of California, San Diego