Manual Pages for UNIX Darwin command on man MPI_Accumulate
MyWebUniversity

Manual Pages for UNIX Darwin command on man MPI_Accumulate

MPIAccumulate(3OpenMPI) MPIAccumulate(3OpenMPI)

NAME

MMPPIIAAccccuummuullaattee - Combines the contents of the origin buffer with that

of a target buffer. SSYYNNTTAAXX CC SSyynnttaaxx

#include

int MPIAccumulate(void *originaddr, int origincount, MPIDatatype origindatatype, int targetrank, MPIAint targetdisp, int targetcount, MPIDatatype targetdatatype, MPIOp op, MPIWin win) FFoorrttrraann SSyynnttaaxx ((sseeee FFOORRTTRRAANN 7777 NNOOTTEESS)) INCLUDE 'mpif.h' MPIACCUMULATE(ORIGINADDR, ORIGINCOUNT, ORIGINDATATYPE, TARGETRANK,

TARGETDISP, TARGETCOUNT, TARGETDATATYPE, OP, WIN, IERROR)

ORIGINADDR(*) INTEGER(KIND=MPIADDRESSKIND) TARGETDISP INTEGER ORIGINCOUNT, ORIGINDATATYPE, TARGETRANK, TARGETCOUNT,

TARGETDATATYPE, OP, WIN, IERROR

CC++++ SSyynnttaaxx

#include

void MPI::Win::Accumulate(const void* originaddr, int origincount, const MPI::Datatype& origindatatype, int targetrank, MPI::Aint targetdisp, int targetcount, const MPI::Datatype& targetdatatype, const MPI::Op& op) const IINNPPUUTT PPAARRAAMMEETTEERRSS originaddr Initial address of buffer (choice). origincount Number of entries in buffer (nonnegative integer). origindatatype Data type of each buffer entry (handle). targetrank Rank of target (nonnegative integer). targetdisp Displacement from start of window to beginning of target buffer (nonnegative integer). targetcount Number of entries in target buffer (nonnegative integer). targetdatatype Data type of each entry in target buffer (handle). op Reduce operation (handle). win Window object (handle). OOUUTTPPUUTT PPAARRAAMMEETTEERR

IERROR Fortran only: Error status (integer).

DESCRIPTION

MPIAccumulate is a function used for one-sided MPI communication that

adds the contents of the origin buffer (as defined by originaddr, ori-

gincount, and origindatatype) to the buffer specified by the argu-

ments targetcount and targetdatatype, at offset targetdisp, in the target window specified by targetrank and win, using the operation op. The target window can only be accessed by processes within the same node. This is similar to MPIPut, except that data is combined into the target area instead of overwriting it.

Any of the predefined operations for MPIReduce can be used. User-

defined functions cannot be used. For example, if op is MPISUM, each element of the origin buffer is added to the corresponding element in the target, replacing the former value in the target. Each datatype argument must be a predefined data type or a derived data type, where all basic components are of the same predefined data type. Both datatype arguments must be constructed from the same predefined data type. The operation op applies to elements of that predefined type. The targetdatatype argument must not specify overlapping entries, and the target buffer must fit in the target window. A new predefined operation, MPIREPLACE, is defined. It corresponds to the associative function f(a, b) =b; that is, the current value in the target memory is replaced by the value supplied by the origin. FFOORRTTRRAANN 7777 NNOOTTEESS The MPI standard prescribes portable Fortran syntax for the TARGETDISP

argument only for Fortran 90. FORTRAN 77 users may use the non-porta-

ble syntax INTEGER*MPIADDRESSKIND TARGETDISP where MPIADDRESSKIND is a constant defined in mpif.h and gives the length of the declared integer in bytes. NNOOTTEESS MPIPut is a special case of MPIAccumulate, with the operation

MPIREPLACE. Note, however, that MPIPut and MPIAccumulate have dif-

ferent constraints on concurrent updates.

It is the user's responsibility to guarantee that, when using the accu-

mulate functions, the target displacement argument is such that accesses to the window are properly aligned according to the data type arguments in the call to the MPIAccumulate function. EERRRROORRSS Almost all MPI routines return an error value; C routines as the value

of the function and Fortran routines in the last argument. C++ func-

tions do not return errors. If the default error handler is set to

MPI::ERRORSTHROWEXCEPTIONS, then on error the C++ exception mechanism

will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with

MPICommseterrhandler; the predefined error handler MPIERRORSRETURN

may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error.

SEE ALSO

MPIPut MPIReduce Open MPI 1.2 September 2006 MPIAccumulate(3OpenMPI)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™