Assertion failure in AgglomerationWrapper
A certain combination of meshes, compilers, and MPI implementations can lead to an assertion failure in the test AgglomerationConvergenceTest
.
The following error appears:
Assertion failed!
File: ../src/hyteg/p1functionspace/VertexDoFFunction.cpp:786
Expression: otherPrimitiveIDsToRank.count( otherPrimitiveID ) > 0
Values: otherPrimitiveIDsToRank.count( otherPrimitiveID ) = 0
0 = 0
in the following settings:
- "annulus_coarse.msh" with np>1, gcc9.3, openmpi 4.0.5
- "3D/regular_octahedron_8el.msh" with np=4 (locally not more available), gcc9.3, openmpi 4.0.5 In both cases size of the subset processes is fixed to one, for larger subset sizes the error might not occur.
The error seems to be caused in the function reverseDistributionDry
. Some packages sent by the non-subset processes are lost, and instead the subset processes receive packages from later on in the program. This leads to non-existing pIDs being added to the inverse mapping, while some pIDs are left out.
A simple fix is to add an MPI barrier after the while-loop, although that may be quite restrictive performance-wise.