MPI_Improbe function

Probes for a message in a non-blocking way. Provides a mechanism to receive the specific message that was matched regardless of intervening probe/receive operations. The matched message is de-queued off the receive queue, giving the application an opportunity to decide how to receive the message based on the information returned by the non-blocking matching probe operation. The matched message is then received using the MPI_Mrecv or MPI_Imrecv function.

Syntax


int MPIAPI MPI_Improbe(
  _In_  int         source,
  _In_  int         tag,
  _In_  MPI_Comm    comm,
  _Out_ Int         *flag,
  _Out_ MPI_Message *message,
  _Out_ MPI_Status  *status
);

Parameters

source [in]

Source rank or MPI_ANY_SOURCE.

tag [in]

Message tag or MPI_ANY_TAG.

comm [in]

MPI communicator handle.

flag [out]

On return, contains a pointer to an integer that indicates whether the specified source, tag, and comm are matched. A non-zero value indicates that the parameters are matched.

message [out]

On return, contains a pointer to the matched message.

status [out]

On return, contains a pointer to an MPI_Status structure where information about the message is stored.

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_IMPROBE(SOURCE, TAG, COMM, FLAG, MESSAGE, STATUS, IERROR)
      INTEGER SOURCE, TAG, COMM, FLAG, MESSAGE, STATUS(MPI_STATUS_SIZE), IERROR

Remarks

This function returns flag = true if there is a message that can be received and that matches the pattern specified by the arguments source, tag, and comm. The call matches the same message that would have been received by a call to MPI_Recv executed at the same point in the program and returns in status the same value that would have been returned by MPI_Recv. In addition, it returns in message a handle to the matched message. Otherwise, the call returns flag = false and leaves status and message undefined.

Requirements

Product

Microsoft MPI v6

Header

Mpi.h;
Mpif.h

Library

Msmpi.lib

DLL

Msmpi.dll

See also

MPI Point to Point Functions
MPI_Mprobe
MPI_Recv
MPI_Imrecv

 

 

Show: