X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/15badc71ce964f6dae6428c9a4c0198fad5d4936..ec3e4ee5f1a7ffeb96e044057809944f364014e6:/src/smpi/colls/alltoall-rdb.c diff --git a/src/smpi/colls/alltoall-rdb.c b/src/smpi/colls/alltoall-rdb.c index 45b529f16a..cb49bfce2a 100644 --- a/src/smpi/colls/alltoall-rdb.c +++ b/src/smpi/colls/alltoall-rdb.c @@ -1,3 +1,9 @@ +/* Copyright (c) 2013-2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + #include "colls_private.h" /***************************************************************************** @@ -33,7 +39,7 @@ int smpi_coll_tuned_alltoall_rdb(void *send_buff, int send_count, int dst_tree_root, rank_tree_root, send_offset, recv_offset; int rank, num_procs, j, k, dst, curr_size, max_size; int last_recv_count = 0, tmp_mask, tree_root, num_procs_completed; - int tag = 1, mask = 1, i = 0; + int tag = COLL_TAG_ALLTOALL, mask = 1, i = 0; char *tmp_buff; char *send_ptr = (char *) send_buff; @@ -50,7 +56,7 @@ int smpi_coll_tuned_alltoall_rdb(void *send_buff, int send_count, max_size = num_procs * recv_increment; - tmp_buff = (char *) xbt_malloc(max_size); + tmp_buff = (char *) smpi_get_tmp_sendbuffer(max_size); curr_size = send_count * num_procs; @@ -143,6 +149,6 @@ int smpi_coll_tuned_alltoall_rdb(void *send_buff, int send_count, send_count, send_type, rank, tag, recv_ptr + (i * recv_count * extent), recv_count, recv_type, rank, tag, comm, &status); - free(tmp_buff); + smpi_free_tmp_buffer(tmp_buff); return MPI_SUCCESS; }