-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Ghosting #27810
base: next
Are you sure you want to change the base?
Ghosting #27810
Conversation
Job Documentation on 3b8c7dd wanted to post the following: View the site here This comment will be updated on new commits. |
As discussed with @oanaoana, the proposed test already passes with the current version of MOOSE (without her changes) so a better test should be conceived to be fully convincing. Ideally such a test would show a memory spike during mesh initialization before the change but not after. |
Job Coverage on 3b8c7dd wanted to post the following: Framework coverage
Modules coverageHeat transfer
Full coverage reportsReports
Warnings
This comment will be updated on new commits. |
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.
it would be good to create a framework test to try and improve coverage
for (auto side : elem->side_index_range()) | ||
for (auto boundary_id : boundary_ids) | ||
if ((elem->processor_id() != p) && (binfo.has_boundary_id(elem, side, boundary_id))) | ||
coupled_elements.insert(std::make_pair(elem, _null_mat)); |
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.
At the point that you've identified the element as needing to be ghosted, you can break out of the boundary id and side loops
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.
Breaking out of two loops the easiest way requires a goto
statement, which is arguably as much bad as it is good. I'm going to suggest that we simply create "a good first" issue to revisit this since you've pointed it out in this review, but I wouldn't necessarily hold up the merge of this PR for this single optimization.
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.
People talk about goto
being bad, but I think it's a dogma. goto
can be used very effectively and clearly and would be a very reasonable two line addition here to save potentially O(n sides) * O(n boundary IDs) unnecessary looping
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.
the amount of time required to implement this change should be under two minutes
Co-authored-by: Alex Lindsay <[email protected]>
Co-authored-by: Alex Lindsay <[email protected]>
Co-authored-by: Alex Lindsay <[email protected]>
Co-authored-by: Alex Lindsay <[email protected]>
Co-authored-by: Alex Lindsay <[email protected]>
Co-authored-by: Alex Lindsay <[email protected]>
Co-authored-by: Alex Lindsay <[email protected]>
Co-authored-by: Alex Lindsay <[email protected]>
Co-authored-by: Alex Lindsay <[email protected]>
Co-authored-by: Alex Lindsay <[email protected]>
Job Precheck on 912a1bc wanted to post the following: Your code requires style changes. A patch was auto generated and copied here
Alternatively, with your repository up to date and in the top level of your repository:
|
goto countBreak; | ||
countBreak: | ||
coupled_elements.insert(std::make_pair(elem, _null_mat)); |
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.
goto countBreak; | |
countBreak: | |
coupled_elements.insert(std::make_pair(elem, _null_mat)); | |
{ | |
coupled_elements.insert(std::make_pair(elem, _null_mat)); | |
goto countBreak; | |
} | |
countBreak: |
This PR addresses #27203.