make sure communication buffers are fully initialized

This commit is contained in:
Axel Kohlmeyer 2020-01-15 13:47:01 -05:00
parent 4d20f1623c
commit 3cb26e576d
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 2 additions and 0 deletions

View File

@ -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);