aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Comm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Comm.c b/src/Comm.c
index ff04905..3155672 100644
--- a/src/Comm.c
+++ b/src/Comm.c
@@ -10,6 +10,7 @@
/* #define DEBUG_PUGH 1 */
+#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -919,6 +920,11 @@ static int PUGH_Sync(pGH *pughGH, pComm *comm)
t1 = MPI_Wtime();
#endif
+ if (pughGH->commmodel == PUGH_ALLOCATEDBUFFERS)
+ {
+ comm->rreq[2*dir] = MPI_REQUEST_NULL;
+ comm->rreq[2*dir+1] = MPI_REQUEST_NULL;
+ }
PostReceiveGA(pughGH, 2*dir, comm);
PostReceiveGA(pughGH, 2*dir+1, comm);
@@ -927,6 +933,11 @@ static int PUGH_Sync(pGH *pughGH, pComm *comm)
printf("PR : %f\n",t2-t1);
#endif
+ if (pughGH->commmodel == PUGH_ALLOCATEDBUFFERS)
+ {
+ comm->sreq[2*dir] = MPI_REQUEST_NULL;
+ comm->sreq[2*dir+1] = MPI_REQUEST_NULL;
+ }
PostSendGA(pughGH, 2*dir, comm);
PostSendGA(pughGH, 2*dir+1, comm);
@@ -938,7 +949,7 @@ static int PUGH_Sync(pGH *pughGH, pComm *comm)
/* Now comes the big difference between derived types and
allocated buffers. With derived types, we now have to
wait on all our recieve AND SEND buffers so we can
- keep on using the send buffers ( as communications are
+ keep on using the send buffers (as communications are
in-place). With the allocated we have to wait on each
recieve, but not on the send, since we don't need the
send buffer until we pack a send again (above)