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

Wait for communication to finish. #15372

Merged
merged 1 commit into from Jun 17, 2023
Merged

Wait for communication to finish. #15372

merged 1 commit into from Jun 17, 2023

Conversation

bangerth
Copy link
Member

As #14127 points out, we do some isends in a function but never wait for these operations to actually finish. This creates a race condition. This patch adds the requisite MPI_Wait operations.

Fixes #14127.

@bangerth bangerth added this to the Release 9.5 milestone Jun 16, 2023
@@ -3665,6 +3665,11 @@ namespace GridTools
AssertThrowMPI(ierr);
}

// At this point, wait for all of the isend operations to finish:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could move this Waitall to the end of the function, which potentially could improve performance. Or am I wrong?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did think of this, but couldn't quite convince myself that that was right -- and then decided that for purposes of a fix for an actual problem, this is good enough. The function is improveworthy anyway for a variety of reasons, and that's on my list for post-release. I think as a bug fix, this is all I propose.

@drwells drwells merged commit 7fc89db into dealii:master Jun 17, 2023
14 checks passed
@bangerth bangerth deleted the wait branch June 20, 2023 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compute_local_to_global_vertex_index_map does not wait for communication to finish
3 participants