From: degomme Date: Mon, 24 Aug 2015 12:35:58 +0000 (+0200) Subject: make tracing work better with gatherv and scatterv X-Git-Tag: v3_13~1632^2~4 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1b0a81fe3d9fec2f6891c25490d346876026ed22?hp=2f405b6f2718785bb78ca4ae12854c10c74f0882 make tracing work better with gatherv and scatterv --- diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index 99fdf8abd2..fae36905ad 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -1820,10 +1820,11 @@ int PMPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, int dt_size_recv = 1; if(!known) dt_size_recv = smpi_datatype_size(recvtype); + if((smpi_comm_rank(comm)==root)){ extra->recvcounts= xbt_malloc(size*sizeof(int)); for(i=0; i< size; i++)//copy data to avoid bad free extra->recvcounts[i] = recvcounts[i]*dt_size_recv; - + } TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra); smpi_mpi_gatherv(sendtmpbuf, sendtmpcount, sendtmptype, recvbuf, recvcounts, @@ -2023,9 +2024,11 @@ int PMPI_Scatterv(void *sendbuf, int *sendcounts, int *displs, int dt_size_send = 1; if(!known) dt_size_send = smpi_datatype_size(sendtype); + if((smpi_comm_rank(comm)==root)){ extra->sendcounts= xbt_malloc(size*sizeof(int)); for(i=0; i< size; i++)//copy data to avoid bad free extra->sendcounts[i] = sendcounts[i]*dt_size_send; + } extra->datatype2 = encode_datatype(recvtype, &known); int dt_size_recv = 1; if(!known)