X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e6224ecd95ff7b6452fe9b2c088138877797542..36fa571a13985879dc627c70ecc2340af606aa42:/src/smpi/colls/allgather-bruck.c diff --git a/src/smpi/colls/allgather-bruck.c b/src/smpi/colls/allgather-bruck.c index 2b49321be2..e0424e15e1 100644 --- a/src/smpi/colls/allgather-bruck.c +++ b/src/smpi/colls/allgather-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. */ + #include "colls_private.h" /***************************************************************************** @@ -89,7 +95,7 @@ int smpi_coll_tuned_allgather_bruck(void *send_buff, int send_count, count = recv_count; - tmp_buff = (char *) xbt_malloc(num_procs * recv_count * recv_extent); + tmp_buff = (char *) smpi_get_tmp_sendbuffer(num_procs * recv_count * recv_extent); // perform a local copy smpi_datatype_copy(send_ptr, send_count, send_type, @@ -124,6 +130,6 @@ int smpi_coll_tuned_allgather_bruck(void *send_buff, int send_count, smpi_mpi_sendrecv(tmp_buff + (num_procs - rank) * recv_count * recv_extent, rank * recv_count, recv_type, rank, tag, recv_ptr, rank * recv_count, recv_type, rank, tag, comm, &status); - free(tmp_buff); + smpi_free_tmp_buffer(tmp_buff); return MPI_SUCCESS; }