X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e6224ecd95ff7b6452fe9b2c088138877797542..3b013fc09cb58be09f9f8d3f3a8161cb92bdbb84:/src/smpi/colls/alltoall-bruck.c diff --git a/src/smpi/colls/alltoall-bruck.c b/src/smpi/colls/alltoall-bruck.c index 9e3117c1f0..10b4d9cf78 100644 --- a/src/smpi/colls/alltoall-bruck.c +++ b/src/smpi/colls/alltoall-bruck.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. */ + /***************************************************************************** * Function: alltoall_bruck @@ -42,7 +48,7 @@ smpi_coll_tuned_alltoall_bruck(void *send_buff, int send_count, 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); @@ -80,7 +86,7 @@ smpi_coll_tuned_alltoall_bruck(void *send_buff, int send_count, smpi_mpi_sendrecv(tmp_buff, position, MPI_PACKED, dst, tag, recv_buff, 1, new_type, src, tag, comm, &status); - smpi_datatype_free(&new_type); + smpi_datatype_unuse(new_type); pof2 *= 2; } @@ -104,6 +110,6 @@ smpi_coll_tuned_alltoall_bruck(void *send_buff, int send_count, 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; }