-
-
Notifications
You must be signed in to change notification settings - Fork 228
Remove NBX call from sub-IndexMap creation #3392
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
Conversation
|
@jpdean could you cast your eye over this? |
jpdean
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.
Nice, it looks good to me! Just a few comments. Also, maybe it would be clearer if things like new_owner were renamed to submap_owner etc?
cpp/dolfinx/common/IndexMap.cpp
Outdated
| [](auto& e) { return e.second; }); | ||
| } | ||
| } | ||
| // Remove duplicate new dest ranks from recv process |
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.
Sorry, can you explain why there would be duplicates? Since new_owner_dest_ranks is created from global_idx_to_possible_owner, do we not already have a unique set of ranks for each index?
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.
We only need the unique set of ranks for all newly assigned indices to the process.
I.e. if a process has taken over index i from process (N, M) and index j from (M, N, Q), what we want to send to this process is (M,N, Q), not (N,M,M,N,Q), as one would then have to do a sort and remove on all received indices.
Co-authored-by: Joe Dean <jpd62@cam.ac.uk>
|
@jpdean what do you think about the revised comments? (in suggestions). |
Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com>
Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com>
Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com>
…into dokken/remove-nbx-submap
@jorgensd thoughts? |
I made the name |
Resolve #3100.
The code gets a bit complex, so I will walk you through the idea here.
a. Assign ownership of this index to existing owner, which means that we know that all indices that sent this to the process, is in the
dest_ranksof the sub-map.b. This means that we need to send all the other processes that require that index to the new owner, as they are new dest ranks.
The new code does this by using the (owner->ghost) communciator that already exists in the code, and sends only the unique set of new dest ranks to the new owner.
There we accumulate the dests from 2a. and 3b. into one unique sorted dest_rank list.