George,
I hate to say this, but I don't think that this is correct. Page 114 in
MPI 1 says (in the section about MPI_Reduce)
"Thus, all processes provide input buffers and output buffers of the
same length, with elements of the same time".
The content is only significant at the root, but all processes have to
provide the buffer according to my understanding...
Thanks
Edgar
bosilca_at_[hidden] wrote:
> Author: bosilca
> Date: 2008-02-03 20:44:41 EST (Sun, 03 Feb 2008)
> New Revision: 17366
> URL: https://svn.open-mpi.org/trac/ompi/changeset/17366
>
> Log:
> As the receive buffer is only significant at root, limit the
> check only where it makes sense.
>
> Text files modified:
> trunk/ompi/mpi/c/reduce.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> Modified: trunk/ompi/mpi/c/reduce.c
> ==============================================================================
> --- trunk/ompi/mpi/c/reduce.c (original)
> +++ trunk/ompi/mpi/c/reduce.c 2008-02-03 20:44:41 EST (Sun, 03 Feb 2008)
> @@ -59,9 +59,7 @@
> free(msg);
> return ret;
> } else if ((ompi_comm_rank(comm) != root && MPI_IN_PLACE == sendbuf) ||
> - (ompi_comm_rank(comm) == root && MPI_IN_PLACE == recvbuf)) {
> - err = MPI_ERR_ARG;
> - } else if( sendbuf == recvbuf ) {
> + (ompi_comm_rank(comm) == root && ((MPI_IN_PLACE == recvbuf) || (sendbuf == recvbuf)))) {
> err = MPI_ERR_ARG;
> } else {
> OMPI_CHECK_DATATYPE_FOR_SEND(err, datatype, count);
> _______________________________________________
> svn mailing list
> svn_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/svn
--
Edgar Gabriel
Assistant Professor
Parallel Software Technologies Lab http://pstl.cs.uh.edu
Department of Computer Science University of Houston
Philip G. Hoffman Hall, Room 524 Houston, TX-77204, USA
Tel: +1 (713) 743-3857 Fax: +1 (713) 743-3335
|