Skip to content

Fix distributed periodic constraints bug - #2590

Closed
roystgnr wants to merge 3 commits into
libMesh:masterfrom
roystgnr:constraints_bug
Closed

roystgnr wants to merge 3 commits into
libMesh:masterfrom
roystgnr:constraints_bug

Conversation

@roystgnr

@roystgnr roystgnr commented Jun 1, 2020

Copy link
Copy Markdown
Member

I noticed some time ago that there was a regression in periodic boundary conditions on distributed mesh on some weird corner case (I could run libMesh "make check" on up to 20 procs, before triggering an assertion failure in one example with 21 procs), but I've only just now managed to track down the problem - when I reduced the amount of default ghosting libMesh does (to include side neighbors but not all point neighbors) I missed one bit of code that was still occasionally depending on
seeing point neighbors.

roystgnr added 3 commits May 26, 2020 13:04
Finding cycles of constraints is easier when there's only one in the
cycle.  This turned out to be a red herring for the bug I'm
investigating but it might be a good idea later.
This helped pin down a bug, and has been cleaned up enough we ought to
be able to leave it in for good.
It turns out that, without ghosting of all point neighbors, we can't
trust find_point_neighbors to return a complete set for partition
boundary points on a distributed mesh, which means we can't
necessarily look at a complete set of element ids to disambiguate
which side should constrain which.

Looking at the specific points themselves to disambiguate constraints
fixes the problem for me, at least on the case where it manifested,
systems_of_equations_ex9.C with 21 processors.
@roystgnr

roystgnr commented Jun 3, 2020

Copy link
Copy Markdown
Member Author

I can reproduce the failure here; it's definitely a real regression, if not due to this patch then triggered by this patch.

@roystgnr

roystgnr commented Jun 5, 2020

Copy link
Copy Markdown
Member Author

Ouch. The regression appears to be merely triggered by this patch; the old code could hypothetically end up failing on corners with multiple periodic boundaries as well, if the element ids ended up being assigned in a particularly perverse way; we've just been lucky enough (hopefully!?!) not to see that.

In hindsight this probably should have been a fix or at least an assertion rather than a comment...

                  // FIXME: This code doesn't yet properly handle
                  // cases where multiple different periodic BCs
                  // intersect.

@jwpeterson

Copy link
Copy Markdown
Member

This PR has been marked "do not merge" since we are no longer accepting PRs into the master branch. All new PRs should be made on the devel branch instead. Once this PR's target branch has been updated to devel, the "do not merge" label will be removed.

@roystgnr

roystgnr commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

Closing this - #4649 fixed the immediate intermittent problem, and has links to discussion of how we'll fix the remaining problems.

@roystgnr roystgnr closed this Nov 9, 2026
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.

2 participants