X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a340d551febe4876af2efe881b0d79a70ee0ace4..d5cc61332edae35867a41bb38ad9401faaab2716:/src/smpi/colls/bcast/bcast-scatter-rdb-allgather.cpp diff --git a/src/smpi/colls/bcast/bcast-scatter-rdb-allgather.cpp b/src/smpi/colls/bcast/bcast-scatter-rdb-allgather.cpp index 2bd91dfb9e..d8cb946f76 100644 --- a/src/smpi/colls/bcast/bcast-scatter-rdb-allgather.cpp +++ b/src/smpi/colls/bcast/bcast-scatter-rdb-allgather.cpp @@ -162,15 +162,15 @@ Coll_bcast_scatter_rdb_allgather::bcast ( } else { - tmp_buf=(void*)xbt_malloc(nbytes); - - /* TODO: Pipeline the packing and communication */ - position = 0; - if (rank == root) { - mpi_errno = datatype->pack(buffer, count, tmp_buf, nbytes, - &position, comm); - if (mpi_errno) xbt_die("crash while packing %d", mpi_errno); - } + tmp_buf = new unsigned char[nbytes]; + + /* TODO: Pipeline the packing and communication */ + position = 0; + if (rank == root) { + mpi_errno = datatype->pack(buffer, count, tmp_buf, nbytes, &position, comm); + if (mpi_errno) + xbt_die("crash while packing %d", mpi_errno); + } } @@ -334,8 +334,8 @@ Coll_bcast_scatter_rdb_allgather::bcast ( } fn_exit: -/* xbt_free(tmp_buf);*/ - return mpi_errno; + /* delete[] static_cast(tmp_buf); */ + return mpi_errno; } }