Commit 6e8bc706 authored by Min Si's avatar Min Si Committed by Xin Zhao
Browse files

Bug-fix: use normal PUT/ACC + FLUSH in req ops test.



In reqops.c, the ring communication test assumes remote
completion after MPI_RPut/MPI_Racc + MPI_Wait, which
is not correct. MPI_Wait only guarantees local completion.

Here we fixed it by replace MPI_Rput/MPI_Racc + MPI_Wait
with MPI_Put/MPI_Acc + MPI_Win_flush.
Signed-off-by: default avatarXin Zhao <xinzhao3@illinois.edu>
parent 818438fc
...@@ -114,9 +114,9 @@ int main( int argc, char *argv[] ) ...@@ -114,9 +114,9 @@ int main( int argc, char *argv[] )
assert(req != MPI_REQUEST_NULL); assert(req != MPI_REQUEST_NULL);
MPI_Wait(&req, MPI_STATUS_IGNORE); MPI_Wait(&req, MPI_STATUS_IGNORE);
MPI_Rput(&rank, 1, MPI_INT, 0, 0, 1, MPI_INT, window, &req); /* Use flush to guarantee remote completion */
assert(req != MPI_REQUEST_NULL); MPI_Put(&rank, 1, MPI_INT, 0, 0, 1, MPI_INT, window);
MPI_Wait(&req, MPI_STATUS_IGNORE); MPI_Win_flush(0, window);
exp = (rank + nproc-1) % nproc; exp = (rank + nproc-1) % nproc;
...@@ -153,9 +153,9 @@ int main( int argc, char *argv[] ) ...@@ -153,9 +153,9 @@ int main( int argc, char *argv[] )
assert(req != MPI_REQUEST_NULL); assert(req != MPI_REQUEST_NULL);
MPI_Wait(&req, MPI_STATUS_IGNORE); MPI_Wait(&req, MPI_STATUS_IGNORE);
MPI_Raccumulate(&rank, 1, MPI_INT, 0, 0, 1, MPI_INT, MPI_REPLACE, window, &req); /* Use flush to guarantee remote completion */
assert(req != MPI_REQUEST_NULL); MPI_Accumulate(&rank, 1, MPI_INT, 0, 0, 1, MPI_INT, MPI_REPLACE, window);
MPI_Wait(&req, MPI_STATUS_IGNORE); MPI_Win_flush(0, window);
exp = (rank + nproc-1) % nproc; exp = (rank + nproc-1) % nproc;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment