X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/def940c56dde95a61d9ca67677ee73547c541ff9..71eae760201a70a3990038cd3c3ad4de09062c68:/src/smpi/colls/reduce-scatter-gather.c diff --git a/src/smpi/colls/reduce-scatter-gather.c b/src/smpi/colls/reduce-scatter-gather.c index 2c61d48f65..af317fb967 100644 --- a/src/smpi/colls/reduce-scatter-gather.c +++ b/src/smpi/colls/reduce-scatter-gather.c @@ -15,7 +15,7 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf, 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; @@ -216,7 +216,7 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf, } - else if (count >= comm_size) { + else /* (count >= comm_size) */ { tmp_buf = (void *) xbt_malloc(count * extent); //if ((rank != root)) @@ -387,6 +387,8 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf, } } } + if (tmp_buf) + free(tmp_buf); if (cnts) free(cnts); if (disps)