-
Notifications
You must be signed in to change notification settings - Fork 391
Avoid MPI deadlocks on SynapseCollection.get()/set() #3101
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nicolossus
approved these changes
Feb 13, 2024
Member
nicolossus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@heplesser LGTM. I have some minor comments/clarifications, but I'll go ahead and approve.
otcathatsya
approved these changes
Feb 14, 2024
Co-authored-by: Nicolai Haug <39106781+nicolossus@users.noreply.github.com>
heplesser
commented
Feb 14, 2024
heplesser
commented
Feb 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
I: No breaking change
Previously written code will work as before, no one should note anything changing (aside the fix)
S: High
Should be handled next
T: Bug
Wrong statements in the code or documentation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #3099. MPI deadlocks could occur if only some MPI ranks performed
get()orset()operations onSynapseCollections. These operations are local operations so while not elegant, they should work even if executed only on some ranks and not on other, e.g., when a rank has no connections.The hang occurred because the
get()/set()methods calledGetKernelStatus()to check for the number of connections to decide whether an SC was still valid. This was misguided to begin with, since the number of connections is only known locally. This is now changed to use the network size, whose global value is locally known. For a proposed proper solution, see #3100.A further problem then was that
GetKernelStatus()calledConnectionManager::update_delay_extrema_(), which unconditionally performed MPI exchange ofmin/max_delay. This PR changes this so that delay extrema are MPI-exchanged only if their values could have changed remotely. This also eliminates the MPI communication hidden in every singlenest.<some property>use and might thus lead to faster execution of simulation scripts.The test simply checks that it does not time out.