SYNTAX
------

C Syntax
^^^^^^^^

.. code-block:: c

    int MPI_Gatherv(const void* sendbuf, int sendcount, MPI_Datatype
        sendtype, void* recvbuf, const int recvcounts[], const int
        displs[], MPI_Datatype recvtype, int root, MPI_Comm comm)

    int MPI_Gatherv_c(const void* sendbuf, MPI_Count sendcount,
        MPI_Datatype sendtype, void* recvbuf, const MPI_Count
        recvcounts[], const MPI_Aint displs[], MPI_Datatype recvtype,
        int root, MPI_Comm comm)

    int MPI_Igatherv(const void* sendbuf, int sendcount, MPI_Datatype
        sendtype, void* recvbuf, const int recvcounts[], const int
        displs[], MPI_Datatype recvtype, int root, MPI_Comm comm,
        MPI_Request* request)

    int MPI_Igatherv_c(const void* sendbuf, MPI_Count sendcount,
        MPI_Datatype sendtype, void* recvbuf, const MPI_Count
        recvcounts[], const MPI_Aint displs[], MPI_Datatype recvtype,
        int root, MPI_Comm comm, MPI_Request* request)

    int MPI_Gatherv_init(const void* sendbuf, int sendcount,
        MPI_Datatype sendtype, void* recvbuf, const int recvcounts[],
        const int displs[], MPI_Datatype recvtype, int root, MPI_Comm
        comm, MPI_Info info, MPI_Request* request)

    int MPI_Gatherv_init_c(const void* sendbuf, MPI_Count sendcount,
        MPI_Datatype sendtype, void* recvbuf, const MPI_Count
        recvcounts[], const MPI_Aint displs[], MPI_Datatype recvtype,
        int root, MPI_Comm comm, MPI_Info info, MPI_Request* request)

Fortran Syntax
^^^^^^^^^^^^^^

.. code-block:: fortran

    USE MPI
    ! or the older form: INCLUDE 'mpif.h'
    MPI_GATHERV(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNTS, DISPLS, RECVTYPE, ROOT, COMM, IERROR)
    	<type> SENDBUF(*), RECVBUF(*)
    	INTEGER SENDCOUNT, SENDTYPE, RECVCOUNTS(*), DISPLS(*), RECVTYPE, ROOT, COMM, IERROR

    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

    MPI_GATHERV_INIT(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNTS, DISPLS, RECVTYPE, ROOT, COMM, INFO, REQUEST, IERROR)
    	<type> SENDBUF(*), RECVBUF(*)
    	INTEGER SENDCOUNT, SENDTYPE, RECVCOUNTS(*), DISPLS(*), RECVTYPE, ROOT, COMM, INFO, REQUEST, IERROR

Fortran 2008 Syntax
^^^^^^^^^^^^^^^^^^^

.. code-block:: fortran

    USE mpi_f08
    MPI_Gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN) :: sendbuf
    	INTEGER, INTENT(IN) :: sendcount, recvcounts(*), displs(*), root
    	TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
    	TYPE(*), DIMENSION(..) :: recvbuf
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror

    MPI_Gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN) :: sendbuf
    	INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN) :: sendcount, recvcounts(*)
    	TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
    	TYPE(*), DIMENSION(..) :: recvbuf
    	INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(IN) :: displs(*)
    	INTEGER, INTENT(IN) :: root
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror

    MPI_Igatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
    	INTEGER, INTENT(IN) :: sendcount, root
    	TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
    	TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
    	INTEGER, INTENT(IN), ASYNCHRONOUS :: recvcounts(*), displs(*)
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	TYPE(MPI_Request), INTENT(OUT) :: request
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror

    MPI_Igatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
    	INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN) :: sendcount
    	TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
    	TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
    	INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN), ASYNCHRONOUS :: recvcounts(*)
    	INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(IN), ASYNCHRONOUS :: displs(*)
    	INTEGER, INTENT(IN) :: root
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	TYPE(MPI_Request), INTENT(OUT) :: request
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror

    MPI_Gatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
    	INTEGER, INTENT(IN) :: sendcount, root
    	TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
    	TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
    	INTEGER, INTENT(IN), ASYNCHRONOUS :: recvcounts(*), displs(*)
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	TYPE(MPI_Info), INTENT(IN) :: info
    	TYPE(MPI_Request), INTENT(OUT) :: request
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror

    MPI_Gatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
    	INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN) :: sendcount
    	TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
    	TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
    	INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN), ASYNCHRONOUS :: recvcounts(*)
    	INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(IN), ASYNCHRONOUS :: displs(*)
    	INTEGER, INTENT(IN) :: root
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	TYPE(MPI_Info), INTENT(IN) :: info
    	TYPE(MPI_Request), INTENT(OUT) :: request
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror
