📄 mpi_put.3
字号:
.\"Copyright 2006, Sun Microsystems, Inc..\" Copyright (c) 1996 Thinking Machines Corporation.TH MPI_Put 3OpenMPI "September 2006" "Open MPI 1.2" " ".SH NAME\fBMPI_Put\fP \- Copies data from the origin memory to the target. .SH SYNTAX.ft R.SH C Syntax.nf#include <mpi.h>MPI_Put(void *\fIorigin_addr\fP, int \fIorigin_count\fP, MPI_Datatype \fIorigin_datatype\fP, int \fItarget_rank\fP, MPI_Aint \fItarget_disp\fP, int \fItarget_count\fP, MPI_Datatype \fItarget_datatype\fP, MPI_Win \fIwin\fP).SH Fortran Syntax (see FORTRAN 77 NOTES).nfINCLUDE 'mpif.h'MPI_PUT(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, TARGET_DISP, TARGET_COUNT, TARGET_DATATYPE, WIN, IERROR\fP) <type> \fIORIGIN_ADDR\fP(*) INTEGER(KIND=MPI_ADDRESS_KIND) \fITARGET_DISP\fP INTEGER \fIORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, TARGET_COUNT, TARGET_DATATYPE, WIN, IERROR\fP.SH C++ Syntax.nf#include <mpi.h>void MPI::Win::Put(const void* \fIorigin_addr\fP, int \fIorigin_count\fP, const MPI::Datatype& \fIorigin_datatype\fP, int \fItarget_rank\fP, MPI::Aint \fItarget_disp\fP, int \fItarget_count\fP, const MPI::Datatype& \fItarget_datatype\fP) const.SH INPUT PARAMETERS.ft R.TP 1iorigin_addrInitial address of origin buffer (choice)..TP 1iorigin_countNumber of entries in origin buffer (nonnegative integer)..TP 1iorigin_datatypeData type of each entry in origin buffer (handle)..TP 1itarget_rankRank of target (nonnegative integer)..TP 1itarget_dispDisplacement from start of window to target buffer (nonnegative integer)..TP 1itarget_countNumber of entries in target buffer (nonnegative integer)..TP 1itarget_datatypeData type of each entry in target buffer (handle)..TP 1iwinWindow object used for communication (handle)..SH OUTPUT PARAMETER.ft R.TP 1iIERRORFortran only: Error status (integer). .SH DESCRIPTION.ft RMPI_Put transfers \fIorigin_count\fP successive entries of the type specified by \fIorigin_datatype\fP, starting at address \fIorigin_addr\fP on the origin node to the target node specified by the \fIwin\fP, \fItarget_rank\fP pair. The data are written in the target buffer at address \fItarget_addr\fP = \fIwindow_base\fP + \fItarget_disp\fP x \fIdisp_unit\fP, where \fIwindow_base\fP and \fIdisp_unit\fP are the base address and window displacement unit specified at window initialization, by the target process..spThe target buffer is specified by the arguments \fItarget_count\fP and \fItarget_datatype\fP..spThe data transfer is the same as that which would occur if the origin process executed a send operation with arguments \fIorigin_addr\fP, \fIorigin_count\fP, \fIorigin_datatype\fP, \fItarget_rank\fP, \fItag\fP, \fIcomm\fP, and the target process executed a receive operation with arguments \fItarget_addr\fP, \fItarget_count\fP, \fItarget_datatype\fP, \fIsource\fP, \fItag\fP, \fIcomm\fP, where \fItarget_addr\fP is the target buffer address computed as explained above, and \fIcomm\fP is a communicator for the group of \fIwin\fP..spThe communication must satisfy the same constraints as for a similar message-passing communication. The \fItarget_datatype\fP may not specify overlapping entries in the target buffer. The message sent must fit, without truncation, in the target buffer. Furthermore, the target buffer must fit in the target window. In addition, only processes within the same buffer can access the target window..spThe \fItarget_datatype\fP argument is a handle to a datatype object defined at the origin process. However, this object is interpreted at the target process: The outcome is as if the target datatype object were defined at the target process, by the same sequence of calls used to define it at the origin process. The target data type must contain only relative displacements, not absolute addresses. The same holds for get and accumulate..SH NOTESThe \fItarget_datatype\fP argument is a handle to a datatype object that is defined at the origin process, even though it defines a data layout in the target process memory. This does not cause problems in a homogeneous or heterogeneous environment, as long as only portable data types are used (portable data types are defined in Section 2.4 of the MPI-2 Standard)..spThe performance of a put transfer can be significantly affected, on some systems, from the choice of window location and the shape and location of the origin and target buffer: Transfers to a target window in memory allocated by MPI_Alloc_mem may be much faster on shared memory systems; transfers from contiguous buffers will be faster on most, if not all, systems; the alignment of the communication buffers may also impact performance..SH FORTRAN 77 NOTES.ft RThe MPI standard prescribes portable Fortran syntax forthe \fITARGET_DISP\fP argument only for Fortran 90. FORTRAN 77users may use the non-portable syntax.sp.nf INTEGER*MPI_ADDRESS_KIND \fITARGET_DISP\fP.fi.spwhere MPI_ADDRESS_KIND is a constant defined in mpif.hand gives the length of the declared integer in bytes..SH ERRORSAlmost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object..spBefore the error value is returned, the current MPI error handler iscalled. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN 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. .SH SEE ALSO.ft R.spMPI_Get.brMPI_Accumulate' @(#)MPI_Put.3 1.13 06/03/09
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -