+/* 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. */
+
/*****************************************************************************
* Function: alltoall_bruck
int *blocks_length, *disps;
int i, src, dst, rank, num_procs, count, remainder, block, position;
- int pack_size, tag = 1, pof2 = 1;
+ int pack_size, tag = COLL_TAG_ALLTOALL, pof2 = 1;
char *tmp_buff;
extent = smpi_datatype_get_extent(recv_type);
- tmp_buff = (char *) xbt_malloc(num_procs * recv_count * extent);
+ tmp_buff = (char *) smpi_get_tmp_sendbuffer(num_procs * recv_count * extent);
disps = (int *) xbt_malloc(sizeof(int) * num_procs);
blocks_length = (int *) xbt_malloc(sizeof(int) * num_procs);
recv_ptr + (num_procs - i - 1) * recv_count * extent,
recv_count, recv_type, rank, tag, comm, &status);
- free(tmp_buff);
+ smpi_free_tmp_buffer(tmp_buff);
return MPI_SUCCESS;
}