You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#4027 resolved a seg fault issue in fast assembly of a boundary lf integrator that occurred when a proc in a ParMesh does not have any boundary element. The fix in #4027 (causing procs w/o boundary elements to simply return) resolves most cases; however, for some cases, the fix in #4027 is not sufficient. For example, if EnsureNodes() was not previously called for the ParMesh, then the following calling sequence now ends in a deadlock due to ParMesh::SetCurvature attempting to create a new ParFiniteElementSpace which requires all procs of the ParMesh (not just the ones owning boundary elements of the ParMesh).
Calling EnsureNodes in BoundaryLFIntegrator::AssembleDevice before checking fes.GetNBE() == 0 (or calling EnsureNodes in LinearFormExtension::Assemble)
Not using the particular fix from Boundary LF Integrators fast assembly bug fix #4027 that returns if fes.GetNBE() == 0 but instead making BoundaryLFIntegrator::AssembleDevice, BoundaryNormalLFIntegrator::AssembleDevice, etc. safe for procs that don't have any boundary elements.
Which one is preferable comes perhaps down to what MFEM internally assumes when calling functions on ParMesh. The first fix solves the particular issue at hand but since BoundaryLFIntegrator::AssembleDevice etc. still call ParMesh functions from only a subset of ParMesh procs, it could lead to issues in the future if those ParMesh functions are changed and (reasonably) assume all procs that are part of the ParMesh are calling a function (not just the ones owning boundary elements of that mesh).
The text was updated successfully, but these errors were encountered:
#4027 resolved a seg fault issue in fast assembly of a boundary lf integrator that occurred when a proc in a
ParMesh
does not have any boundary element. The fix in #4027 (causing procs w/o boundary elements to simply return) resolves most cases; however, for some cases, the fix in #4027 is not sufficient. For example, ifEnsureNodes()
was not previously called for theParMesh
, then the following calling sequence now ends in a deadlock due toParMesh::SetCurvature
attempting to create a newParFiniteElementSpace
which requires all procs of theParMesh
(not just the ones owning boundary elements of theParMesh
).Here are two possible fixes for this issue:
EnsureNodes
inBoundaryLFIntegrator::AssembleDevice
before checkingfes.GetNBE() == 0
(or callingEnsureNodes
inLinearFormExtension::Assemble
)fes.GetNBE() == 0
but instead makingBoundaryLFIntegrator::AssembleDevice
,BoundaryNormalLFIntegrator::AssembleDevice
, etc. safe for procs that don't have any boundary elements.Which one is preferable comes perhaps down to what MFEM internally assumes when calling functions on
ParMesh
. The first fix solves the particular issue at hand but sinceBoundaryLFIntegrator::AssembleDevice
etc. still callParMesh
functions from only a subset ofParMesh
procs, it could lead to issues in the future if thoseParMesh
functions are changed and (reasonably) assume all procs that are part of theParMesh
are calling a function (not just the ones owning boundary elements of that mesh).The text was updated successfully, but these errors were encountered: