X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/befbbbe1fbb31663a8f91e24ce12df271cf4ae79..e3771caa277bcafe6b67c9bfaf18ab8ee70001a7:/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 f81694d4d1..d8cb946f76 100644 --- a/src/smpi/colls/bcast/bcast-scatter-rdb-allgather.cpp +++ b/src/smpi/colls/bcast/bcast-scatter-rdb-allgather.cpp @@ -1,10 +1,10 @@ -/* Copyright (c) 2011-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2011-2019. 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" -#include "src/smpi/smpi_status.hpp" +#include "../colls_private.hpp" +#include "smpi_status.hpp" namespace simgrid{ namespace smpi{ @@ -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; } }