Unverified Commit 3cb26e57 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

make sure communication buffers are fully initialized

parent 4d20f162
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -982,6 +982,7 @@ rendezvous_all2all(int n, char *inbuf, int insize, int inorder, int *procs,
    memory->create(procs_a2a,nprocs,"rendezvous:procs");
    inbuf_a2a = (char *) memory->smalloc((bigint) n*insize,
                                         "rendezvous:inbuf");
    memset(inbuf_a2a,0,(bigint)n*insize*sizeof(char));
    memory->create(offsets,nprocs,"rendezvous:offsets");

    for (int i = 0; i < nprocs; i++) procs_a2a[i] = 0;
@@ -1045,6 +1046,7 @@ rendezvous_all2all(int n, char *inbuf, int insize, int inorder, int *procs,

  char *inbuf_rvous = (char *) memory->smalloc((bigint) nrvous*insize,
                                               "rendezvous:inbuf");
  memset(inbuf_rvous,0,(bigint) nrvous*insize*sizeof(char));

  MPI_Alltoallv(inbuf_a2a,sendcount,sdispls,MPI_CHAR,
                inbuf_rvous,recvcount,rdispls,MPI_CHAR,world);