Date: Wed, 6 Oct 2004 18:45:22 +0200 From: Jesper Larsson Traeff To: mpi-21@XXXXXXXXXXXXX Cc: Jesper Larsson Traeff Subject: MPI_REDUCE_SCATTER_BLOCK References: <200105061719.MAA30522@XXXXXXXXXXX> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200105061719.MAA30522@XXXXXXXXXXX> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Spam-Status: No, hits=-3.9 required=5.0 tests=IN_REP_TO,REFERENCES,USER_AGENT_MUTT version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Sender: owner-mpi-21@XXXXXXXXXXXXX Precedence: bulk Reply-To: mpi-21@XXXXXXXXXXXXX Dear group, during discussions at the recent EuroPVM/MPI conference it came up that a regular variant of the MPI_REDUCE_SCATTER collective is indeed useful, can be implemented with lower latency than the general variant, and is missing from the standard. Here is a proposal for an addition to the standard: ------------------------------------------------------------------------- MPI_REDUCE_SCATTER_BLOCK(sendbuf, recvbuf, recvcount, datatype, op, comm) C interface: int MPI_Reduce_scatter_block(void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) (etc, for Fortran and C++) MPI_REDUCE_SCATTER is often called with the same number of elements contributed by each process. To cater for this, the "regular" MPI_REDUCE_SCATTER_BLOCK collective performs an element-wise reduction on a vector of count = size*recvcount elements, where size is the number of processes in comm, and splits the resulting vector into disjoint, consecutive blocks each of recvcount elements. The i'th block is stored in the receive buffer of process i defined by recvbuf, recvcount, and datatype. The arguments recvcount and op must have identical values at all processes, and the datatype arguments should match. Thus, all processes provide input and output buffers of the same length, with elements of the same type. The "in place" option is specified as for MPI_REDUCE_SCATTER and has the same effect. Rationale: MPI_REDUCE_SCATTER_BLOCK not only covers a common usage pattern for the reduce-scatter operation, but can be implemented with lower latency than the more general MPI_REDUCE_SCATTER function. -------------------------------------------------------------------------- Best regards Jesper