X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3c8feb27df205372a67f1230e4038b30c38d0f3d..7f04fa5306f52960db709bb520c49e9f4ecec000:/src/smpi/colls/alltoall-rdb.c diff --git a/src/smpi/colls/alltoall-rdb.c b/src/smpi/colls/alltoall-rdb.c index 406d98ded9..edee61aa0f 100644 --- a/src/smpi/colls/alltoall-rdb.c +++ b/src/smpi/colls/alltoall-rdb.c @@ -33,7 +33,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, tmp_mask, tree_root, num_procs_completed; - int tag = 1, mask = 1, success = 1, failure = 0, i = 0; + int tag = 1, mask = 1, i = 0; char *tmp_buff; char *send_ptr = (char *) send_buff; @@ -50,12 +50,7 @@ int smpi_coll_tuned_alltoall_rdb(void *send_buff, int send_count, max_size = num_procs * recv_increment; - tmp_buff = (char *) malloc(max_size); - if (!tmp_buff) { - printf("alltoall-rdb:56: cannot allocate memory\n"); - MPI_Finalize(); - exit(failure); - } + tmp_buff = (char *) xbt_malloc(max_size); curr_size = send_count * num_procs; @@ -149,5 +144,5 @@ int smpi_coll_tuned_alltoall_rdb(void *send_buff, int send_count, recv_ptr + (i * recv_count * extent), recv_count, recv_type, rank, tag, comm, &status); free(tmp_buff); - return success; + return MPI_SUCCESS; }