1 /*
2 * Copyright (C) by Argonne National Laboratory
3 * See COPYRIGHT in top-level directory
4 */
5
6 #include "mpiimpl.h"
7
MPIR_Gather_allcomm_nb(const void * sendbuf,int sendcount,MPI_Datatype sendtype,void * recvbuf,int recvcount,MPI_Datatype recvtype,int root,MPIR_Comm * comm_ptr,MPIR_Errflag_t * errflag)8 int MPIR_Gather_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
9 int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
10 MPIR_Errflag_t * errflag)
11 {
12 int mpi_errno = MPI_SUCCESS;
13 MPIR_Request *req_ptr = NULL;
14
15 /* just call the nonblocking version and wait on it */
16 mpi_errno =
17 MPIR_Igather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr,
18 &req_ptr);
19
20 mpi_errno = MPIC_Wait(req_ptr, errflag);
21 MPIR_ERR_CHECK(mpi_errno);
22 MPIR_Request_free(req_ptr);
23
24 fn_exit:
25 return mpi_errno;
26 fn_fail:
27 goto fn_exit;
28 }
29