From: Augustin Degomme Date: Sat, 7 Aug 2021 19:49:05 +0000 (+0200) Subject: oops, maxsize was needed here. X-Git-Tag: v3.29~154 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/72de76f746a8ebce2af82691a88b04ce49219cb8 oops, maxsize was needed here. --- diff --git a/src/smpi/bindings/smpi_pmpi_coll.cpp b/src/smpi/bindings/smpi_pmpi_coll.cpp index 5ca09f8170..0515a37261 100644 --- a/src/smpi/bindings/smpi_pmpi_coll.cpp +++ b/src/smpi/bindings/smpi_pmpi_coll.cpp @@ -808,7 +808,7 @@ int PMPI_Ialltoallv(const void* sendbuf, const int* sendcounts, const int* sendd std::vector tmp_sendbuf; std::vector tmp_sendcounts; std::vector tmp_senddispls; - const void* real_sendbuf = smpi_get_in_place_buf(sendbuf, recvbuf, tmp_sendbuf, maxsize, MPI_CHAR); + const void* real_sendbuf; if (sendbuf == MPI_IN_PLACE) { tmp_sendcounts.assign(recvcounts, recvcounts + size); @@ -824,6 +824,7 @@ int PMPI_Ialltoallv(const void* sendbuf, const int* sendcounts, const int* sendd if (((recvdispls[i] + recvcounts[i]) * dt_size_recv) > maxsize) maxsize = (recvdispls[i] + recvcounts[i]) * dt_size_recv; } + real_sendbuf = smpi_get_in_place_buf(sendbuf, recvbuf, tmp_sendbuf, maxsize, MPI_CHAR); if(recvtype->size() * recvcounts[comm->rank()] != real_sendtype->size() * real_sendcounts[comm->rank()]){ XBT_WARN("MPI_(I)Alltoallv : receive size from me differs from sent size to me : %zu vs %zu", recvtype->size() * recvcounts[comm->rank()], real_sendtype->size() * real_sendcounts[comm->rank()]);