Skip to content

Latest commit

 

History

History
131 lines (101 loc) · 3.31 KB

mpi-send-function.md

File metadata and controls

131 lines (101 loc) · 3.31 KB
title TOCTitle ms:assetid ms:mtpsurl ms:contentKeyID ms.date mtps_version f1_keywords dev_langs api_location api_name api_type product topic_type product_family_name ROBOTS description
MPI_Send function
MPI_Send function
02e5b56e-a813-46bc-8927-b9481b932830
59361002
03/28/2018
v=VS.85
MPI_SEND
mpif/MPI_Send
mpi/MPI_SEND
C++
C
Msmpi.dll
MPI_Send
DLLExport
Windows
apiref
kbSyntax
VS
INDEX,FOLLOW
Master the MPI_Send function with this comprehensive guide. Learn about its syntax, parameters, return values, and how it performs standard mode send operations.

MPI_Send function

Performs a standard mode send operation and returns when the send buffer can be safely reused.

Syntax

int MPIAPI MPI_Send(
  _In_opt_ void         *buf,
           int          count,
           MPI_Datatype datatype,
           int          dest,
           int          tag,
           MPI_Comm     comm
);

Parameters

  • buf [in, optional]
    A pointer to the buffer that contains the data to be sent.

  • count
    The number of elements in the buffer. If the data part of the message is empty, set the count parameter to 0.

  • datatype
    The data type of the elements in the buffer.

  • dest
    The rank of the destination process within the communicator that is specified by the comm parameter.

  • tag
    The message tag that can be used to distinguish different types of messages.

  • comm
    The handle to the communicator.

Return value

Returns MPI_SUCCESS on success. Otherwise, the return value is an error code.

In Fortran, the return value is stored in the IERROR parameter.

Fortran

    MPI_SEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR)
        <type> BUF(*)
        INTEGER COUNT, DATATYPE, DEST, TAG, COMM, IERROR

Remarks

This function is non-local. Successful completion might depend on the existence of a matching receive function.

This function can return before a matching receive function is invoked if the MPI implementation buffers the message. However, buffer space might be unavailable, or outgoing messages might not be buffered for performance reasons. If the message is not buffered, the function does not return until the data has been moved to the receiving process.

This function can be called whether or not a matching receive function is posted. It might finish before a matching receive function is posted.

Requirements

Product

HPC Pack 2012 MS-MPI Redistributable Package, HPC Pack 2008 R2 MS-MPI Redistributable Package, HPC Pack 2008 MS-MPI Redistributable Package or HPC Pack 2008 Client Utilities

Header

Mpi.h; Mpif.h

Library

Msmpi.lib

DLL

Msmpi.dll

See also

MPI Point to Point Functions

MPI_Bsend

MPI_Rsend

MPI_Ssend

MPI_Recv