X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/89e44dce958ad9625570b126f11d299b829d4932..1faf1e4ac5d8295ab562c45a5507a471ad4540a6:/src/smpi/colls/reduce-scatter-gather.c?ds=sidebyside diff --git a/src/smpi/colls/reduce-scatter-gather.c b/src/smpi/colls/reduce-scatter-gather.c index fd1c5dccc9..24ad911264 100644 --- a/src/smpi/colls/reduce-scatter-gather.c +++ b/src/smpi/colls/reduce-scatter-gather.c @@ -10,12 +10,12 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf, MPI_Op op, int root, MPI_Comm comm) { MPI_Status status; - int comm_size, rank, type_size, pof2, rem, newrank; + int comm_size, rank, pof2, rem, newrank; int mask, *cnts, *disps, i, j, send_idx = 0; int recv_idx, last_idx = 0, newdst; int dst, send_cnt, recv_cnt, newroot, newdst_tree_root; int newroot_tree_root, new_count; - int tag = 4321; + int tag = COLL_TAG_REDUCE; void *send_ptr, *recv_ptr, *tmp_buf; cnts = NULL; @@ -29,7 +29,6 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf, comm_size = smpi_comm_size(comm); extent = smpi_datatype_get_extent(datatype); - type_size = smpi_datatype_size(datatype); /* find nearest power-of-two less than or equal to comm_size */ pof2 = 1; @@ -42,7 +41,7 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf, send_ptr = (void *) xbt_malloc(new_count * extent); recv_ptr = (void *) xbt_malloc(new_count * extent); tmp_buf = (void *) xbt_malloc(new_count * extent); - memcpy(send_ptr, sendbuf, extent * new_count); + memcpy(send_ptr, sendbuf, extent * count); //if ((rank != root)) smpi_mpi_sendrecv(send_ptr, new_count, datatype, rank, tag,