Exemplo n.º 1
0
int MPI_Allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
                   void *recvbuf, int *recvcounts, int *displs,
                   MPI_Datatype recvtype, MPI_Comm comm)
{
  return PMPI_Allgatherv(sendbuf, sendcount, sendtype,
                         recvbuf, recvcounts, displs, recvtype,
                         comm);
}
Exemplo n.º 2
0
int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                   void *recvbuf, const int recvcounts[], const int displs[],
                   MPI_Datatype recvtype, MPI_Comm comm)
{
    char sendtypename[MPI_MAX_OBJECT_NAME], recvtypename[MPI_MAX_OBJECT_NAME];
    char commname[MPI_MAX_OBJECT_NAME];
    int len;
    int rank;
    
    PMPI_Comm_rank(MPI_COMM_WORLD, &rank);    
    PMPI_Type_get_name(sendtype, sendtypename, &len);
    PMPI_Type_get_name(recvtype, recvtypename, &len);
    PMPI_Comm_get_name(comm, commname, &len);
    
    fprintf(stderr, "MPI_ALLGATHERV[%d]: sendbuf %0" PRIxPTR " sendcount %d sendtype %s\n\trecvbuf %0" PRIxPTR " recvtype %s comm %s\n",
           rank, (uintptr_t) sendbuf, sendcount, sendtypename, (uintptr_t) recvbuf, recvtypename, commname);
    fflush(stderr);
    
    return PMPI_Allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm);
}
Exemplo n.º 3
0
int MPI_Allgatherv( const void* sbuff, int scnt, MPI_Datatype stype,
                    void* rbuff, const int *rcnts, const int *displs, MPI_Datatype rtype,
                    MPI_Comm comm )
{
    char            call[COLLCHK_SM_STRLEN];
    int             g2g = 1, r;
    int             are2buffs;

    sprintf( call, "ALLGATHERV" );

    /* Check if init has been called */
    g2g = CollChk_is_init();

    if( g2g ) {
        MPI_Comm_rank(comm, &r);

        /* check for call consistency */
        CollChk_same_call( comm, call );
        /* check MPI_IN_PLACE consistency */
        CollChk_check_buff( comm, sbuff, call );

        /* check data signature consistency */
#if defined( HAVE_MPI_IN_PLACE )
        are2buffs = ( sbuff != MPI_IN_PLACE );
#else
        are2buffs = 1;
#endif
        CollChk_dtype_allgatherv(comm, stype, scnt, rtype, rcnts,
                                 are2buffs, call);

        /* make the call */
        return PMPI_Allgatherv( sbuff, scnt, stype,
                                rbuff, rcnts, displs, rtype,
                                comm );
    }
    else {
        /* init not called */
        return CollChk_err_han( "MPI_Init() has not been called!",
                                COLLCHK_ERR_NOT_INIT, call, comm );
    }
}