Edit

Share via


MPI_Igatherv function

Gathers variable data from all members of a group to one member in a non-blocking way.

Syntax

int MPIAPI MPI_Igatherv(
  _In_opt_  const void         *sendbuf,
  _In_            int          sendcount,
  _In_            MPI_Datatype sendtype,
  _Out_opt_       void         *recvbuf,
  _In_opt_  const int          recvcounts[],
  _In_opt_  const int          displs[],
  _In_            MPI_Datatype recvtype,
  _In_            int          root,
  _In_            MPI_Comm     comm,
  _Out_           MPI_Request  *request
);

Parameters

  • sendbuf [in, optional]
    The handle to a buffer that contains the data to be sent to the root process.

    If the comm parameter references an intracommunicator, you can specify an in-place option by specifying MPI_IN_PLACE in all processes. The sendcount and sendtype parameters are ignored. Each process enters data in the corresponding receive buffer element. The nth process sends data to the nth element of the receive buffer. The data that is sent by the root process is assumed to be in the correct place in the receive buffer.

  • sendcount [in]
    The number of elements in the send buffer. If sendcount is zero, the data part of the message is empty.

  • sendtype [in]
    The data type of each element in the buffer.

  • recvbuf [out, optional]
    The handle to a buffer on the root process that contains the data that is received from each process, including data that is sent by the root process. This parameter is significant only at the root process. The recvbuf parameter is ignored for all non-root processes.

  • recvcounts[] [in, optional]
    The number of elements that is received from each process. Each element in the array corresponds to the rank of the sending process. If the count is zero, the data part of the message is empty. This parameter is significant only at the root process.

  • displs[] [in, optional]
    The location, relative to the recvbuf parameter, of the data from each communicator process. The data that is received from process j is placed into the receive buffer of the root process offset displs[j] elements from the sendbuf pointer.

    In the recvbuf, recvcounts, and displs parameter arrays, the nth element of each array refers to the data that is received from the nth communicator process.

    This parameter is significant only at the root process.

  • recvtype [in]
    The data type of each element in buffer. This parameter is significant only at the root process.

  • root [in]
    The rank of the receiving process within the specified communicator.

  • comm [in]
    The MPI_Comm communicator handle.

  • request [out]
    The MPI_Request handle representing the communication operation.

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_IGATHERV(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNTS, DISPLS, RECVTYPE,
    ROOT, COMM, REQUEST, IERROR)
        <type> SENDBUF(*), RECVBUF(*)
        INTEGER SENDCOUNT, SENDTYPE, RECVCOUNTS(*), DISPLS(*), RECVTYPE, ROOT, COMM, REQUEST, IERROR

Remarks

A non-blocking call initiates a collective reduction operation which must be completed in a separate completion call. Once initiated, the operation may progress independently of any computation or other communication at participating processes. In this manner, non-blocking reduction operations can mitigate possible synchronizing effects of reduction operations by running them in the “background.”

All completion calls (e.g., MPI_Wait) are supported for non-blocking reduction operations.

Requirements

Product

Microsoft MPI v7

Header

Mpi.h; Mpif.h

Library

Msmpi.lib

DLL

Msmpi.dll

See also

MPI Collective Functions

MPI_Datatype

MPI_Gatherv

MPI_Test

MPI_Testall

MPI_Testany

MPI_Testsome

MPI_Wait

MPI_Waitall

MPI_Waitany

MPI_Waitsome