petsc-custom: add internal-boundary ownership patch, mpi test, and docs - #78
Merged
lmoresi merged 2 commits intoMar 12, 2026
Conversation
gthyagi
force-pushed
the
feature/boundary-integrals
branch
from
March 12, 2026 01:25
6fca5e6 to
0561eae
Compare
Contributor
Author
|
@lmoresi quick clarification: this PR’s I’m happy to leave consolidation of patch history and documentation to your preferred approach. I will leave it up to you to create a new PETSc MR or add this to your existing PETSc MR. |
lmoresi
merged commit Mar 12, 2026
c98affe
into
underworldcode:feature/boundary-integrals
1 check passed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Internal-boundary assembly in parallel was rank-dependent for PETSc DMPlex boundary workflows used by UW3 (natural BC / boundary-integral paths). This showed up as branch-split benchmark errors (notably at higher MPI counts) even for identical physics/input.
Root Cause
DMPlexComputeBdResidualSingleByKeyusedsupport[0]unconditionally instead ofsupport[key.part].part > 0, points with insufficient support were not filtered/guarded consistently.What This PR Adds
petsc-custom/patches/plexfem-internal-boundary-ownership-fix.patchpetsc-custom/patches/PETSC_MR_DESCRIPTION_INTERNAL_BOUNDARY_OWNERSHIP.mdpetsc-custom/build-petsc.shnow prefers the new patch, with legacy fallback to the older patch if the new file is absent.tests/parallel/test_0765_internal_boundary_integral_mpi.pypetsc-custom/README.mdCHANGES.mdPETSc Fix Summary
In
src/dm/impls/plex/plexfem.c:DMPlexComputeBdIntegralDMPlexComputeBdResidual_InternalDMPlexComputeBdJacobian_InternalDMPlexComputeBdResidualSingleByKey:key.part > 0support[key.part]for closure gather/scatterValidation
mpirun -np 4 python -m pytest --with-mpi tests/parallel/test_0765_internal_boundary_integral_mpi.py -qEx_Stokes_Kramer_latest.py,case1,natural) is stable acrossnp=1,2,4,8.Patch Application Guidance
plexfem-internal-boundary-ownership-fix.patchplexfem-ghost-facet-fix.patch