X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6de03ecc4e630732984a0673512a5d15fd75e270..1687df79d61a9418bba830bbd0ab7de16e457090:/src/smpi/colls/allgatherv-ompi-bruck.c diff --git a/src/smpi/colls/allgatherv-ompi-bruck.c b/src/smpi/colls/allgatherv-ompi-bruck.c index d554938460..d87dbab0e7 100644 --- a/src/smpi/colls/allgatherv-ompi-bruck.c +++ b/src/smpi/colls/allgatherv-ompi-bruck.c @@ -83,16 +83,16 @@ int smpi_coll_tuned_allgatherv_ompi_bruck(void *sbuf, int scount, MPI_Datatype rdtype, MPI_Comm comm) { - int rank, size; - int sendto, recvfrom, distance, blockcount, i; + int sendto, recvfrom, blockcount, i; + unsigned int distance; int *new_rcounts = NULL, *new_rdispls = NULL; int *new_scounts = NULL, *new_sdispls = NULL; ptrdiff_t slb, rlb, sext, rext; char *tmpsend = NULL, *tmprecv = NULL; - MPI_Datatype new_rdtype, new_sdtype; + MPI_Datatype new_rdtype = MPI_DATATYPE_NULL, new_sdtype = MPI_DATATYPE_NULL; - size = smpi_comm_size(comm); - rank = smpi_comm_rank(comm); + unsigned int size = smpi_comm_size(comm); + unsigned int rank = smpi_comm_rank(comm); XBT_DEBUG( "coll:tuned:allgather_ompi_bruck rank %d", rank); @@ -123,9 +123,6 @@ int smpi_coll_tuned_allgatherv_ompi_bruck(void *sbuf, int scount, - blockcount doubles until the last step when only the remaining data is exchanged. */ - blockcount = 1; - tmpsend = (char*) rbuf; - new_rcounts = (int*) calloc(4*size, sizeof(int)); new_rdispls = new_rcounts + size; new_scounts = new_rdispls + size; @@ -165,8 +162,8 @@ int smpi_coll_tuned_allgatherv_ompi_bruck(void *sbuf, int scount, rbuf, 1, new_rdtype, recvfrom, COLL_TAG_ALLGATHERV, comm, MPI_STATUS_IGNORE); - smpi_datatype_free(&new_sdtype); - smpi_datatype_free(&new_rdtype); + smpi_datatype_unuse(new_sdtype); + smpi_datatype_unuse(new_rdtype); }