Commit 45dfd815 authored by Xin Zhao's avatar Xin Zhao
Browse files

Bug-fix: correct local/remote completion in Win_flush_local.



The original implementation in Win_flush_local counts number
of total local completion and remote completion needed to
wait, and then waiting for current local/remote completion
count to reach those values. There is a bug that we should
initialize the current count to zero in each while loop,
otherwise the targets that are already completed will be
count again and we failed to wait for some targets to be
completed. This patch fixes this issue.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 0b9a13e2
......@@ -1784,6 +1784,8 @@ int MPIDI_Win_flush_local_all(MPID_Win * win_ptr)
/* wait for remote completion for those targets that disable flush_local,
* and wait for local completion for other targets */
do {
local_completed_cnt = 0;
remote_completed_cnt = 0;
for (i = 0; i < win_ptr->num_slots; i++) {
curr_target = win_ptr->slots[i].target_list_head;
while (curr_target != NULL) {
......
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