Commit 3df58689 authored by Xin Zhao's avatar Xin Zhao
Browse files

Bug-fix: add barriers between init buffers and issuing RMA operations.


Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 21126e9e
......@@ -149,7 +149,9 @@ int main (int argc, char *argv[]) {
MPI_Win_unlock(rank, win);
}
MPI_Win_lock_all(0, win);
MPI_Barrier(MPI_COMM_WORLD);
MPI_Win_lock_all(0, win);
if (rank != dest) {
for (i = 0; i < my_buf_num; i++) {
MPI_Get_accumulate(&(orig_buf[i*OP_COUNT]), 1, origin_dtp,
......@@ -176,7 +178,9 @@ int main (int argc, char *argv[]) {
MPI_Win_unlock(rank, win);
}
MPI_Win_lock_all(0, win);
MPI_Barrier(MPI_COMM_WORLD);
MPI_Win_lock_all(0, win);
if (rank != dest) {
for (i = 0; i < my_buf_num; i++) {
MPI_Get_accumulate(&(orig_buf[i*OP_COUNT]), OP_COUNT, MPI_INT,
......@@ -203,7 +207,9 @@ int main (int argc, char *argv[]) {
MPI_Win_unlock(rank, win);
}
MPI_Win_lock_all(0, win);
MPI_Barrier(MPI_COMM_WORLD);
MPI_Win_lock_all(0, win);
if (rank != dest) {
for (i = 0; i < my_buf_num; i++) {
MPI_Get_accumulate(&(orig_buf[i*OP_COUNT]), 1, origin_dtp,
......
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