Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check async flush progress during need_checkpoint and should_exit #532

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/scr.c
Original file line number Diff line number Diff line change
Expand Up @@ -3123,6 +3123,12 @@ int SCR_Need_checkpoint(int* flag)
/* rank 0 broadcasts the decision */
MPI_Bcast(flag, 1, MPI_INT, 0, scr_comm_world);

/* if we have an async flush ongoing, take this chance to check whether it's completed */
if (scr_flush_async_in_progress()) {
/* got an outstanding async flush, let's check it */
scr_flush_async_progall(scr_cindex);
}

return SCR_SUCCESS;
}

Expand Down Expand Up @@ -3756,6 +3762,12 @@ int SCR_Should_exit(int* flag)
*flag = 1;
}

/* if we have an async flush ongoing, take this chance to check whether it's completed */
if (scr_flush_async_in_progress()) {
/* got an outstanding async flush, let's check it */
scr_flush_async_progall(scr_cindex);
}

return SCR_SUCCESS;
}

Expand Down