int MPIX_Ineighbor_allgather_x(const void *sendbuf, MPI_Count sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Count recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request * request) { int rc = MPI_SUCCESS; if (likely (sendcount <= bigmpi_int_max && recvcount <= bigmpi_int_max )) { rc = MPI_Ineighbor_allgather(sendbuf, (int)sendcount, sendtype, recvbuf, (int)recvcount, recvtype, comm, request); } else if (sendcount > bigmpi_int_max && recvcount <= bigmpi_int_max ) { MPI_Datatype newsendtype; BigMPI_Type_contiguous(0,sendcount, sendtype, &newsendtype); MPI_Type_commit(&newsendtype); rc = MPI_Ineighbor_allgather(sendbuf, 1, newsendtype, recvbuf, (int)recvcount, recvtype, comm, request); MPI_Type_free(&newsendtype); } else if (sendcount <= bigmpi_int_max && recvcount > bigmpi_int_max ) { MPI_Datatype newrecvtype; BigMPI_Type_contiguous(0,recvcount, recvtype, &newrecvtype); MPI_Type_commit(&newrecvtype); rc = MPI_Ineighbor_allgather(sendbuf, (int)sendcount, sendtype, recvbuf, 1, newrecvtype, comm, request); MPI_Type_free(&newrecvtype); } else { MPI_Datatype newsendtype, newrecvtype; BigMPI_Type_contiguous(0,sendcount, sendtype, &newsendtype); BigMPI_Type_contiguous(0,recvcount, recvtype, &newrecvtype); MPI_Type_commit(&newsendtype); MPI_Type_commit(&newrecvtype); rc = MPI_Ineighbor_allgather(sendbuf, 1, newsendtype, recvbuf, 1, newrecvtype, comm, request); MPI_Type_free(&newsendtype); MPI_Type_free(&newrecvtype); } return rc; }
void ompi_ineighbor_allgather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { int ierr_c; MPI_Comm c_comm; MPI_Request c_req; MPI_Datatype c_sendtype, c_recvtype; c_comm = MPI_Comm_f2c(*comm); c_sendtype = MPI_Type_f2c(*sendtype); c_recvtype = MPI_Type_f2c(*recvtype); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); ierr_c = MPI_Ineighbor_allgather(sendbuf, OMPI_FINT_2_INT(*sendcount), c_sendtype, recvbuf, OMPI_FINT_2_INT(*recvcount), c_recvtype, c_comm, &c_req); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c); if (MPI_SUCCESS == ierr_c) *request = MPI_Request_c2f(c_req); }
FORT_DLL_SPEC void FORT_CALL mpi_ineighbor_allgather_ ( void*v1, MPI_Fint *v2, MPI_Fint *v3, void*v4, MPI_Fint *v5, MPI_Fint *v6, MPI_Fint *v7, MPI_Fint *v8, MPI_Fint *ierr ){ *ierr = MPI_Ineighbor_allgather( v1, (int)*v2, (MPI_Datatype)(*v3), v4, (int)*v5, (MPI_Datatype)(*v6), (MPI_Comm)(*v7), (MPI_Request *)(v8) ); }