From 72de76f746a8ebce2af82691a88b04ce49219cb8 Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Sat, 7 Aug 2021 21:49:05 +0200 Subject: [PATCH] oops, maxsize was needed here. --- src/smpi/bindings/smpi_pmpi_coll.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()]); -- 2.20.1