core icon indicating copy to clipboard operation
core copied to clipboard

Parmetis crashes with empty parts during adaptation

Open bobpaw opened this issue 4 months ago • 1 comments

When building with ENABLE_ZOLTAN=ON, it seems like Parmetis arguments are not setup correctly to handle empty parts. Not sure if this is in our code or Zoltan code.

See log file from the capVol_CubeMds3D-4 test case:

120: MeshAdapt: --iter 2 of shape correction loop: #bad elements 2658
120: 
120: MeshAdapt: snapped in 0.000654 seconds: 0 targets, 0 non-layer snaps
120: 
120: MeshAdapt: --fixLargeAngles       in 0.227842 seconds: #bad elements 2010
120: APF warning: 1 empty parts
120: APF warning: 1 empty parts
120: APF warning: 1 empty parts
120: 
120: MeshAdapt: --fixShortEdgeElements in 4.683730 seconds: #bad elements 1051
120: PARMETIS ERROR vwgt is NULL.
120: PARMETIS ERROR: sum weight for constraint 0 is zero.
120: PARMETIS ERROR: sum weight for constraint 0 is zero.
120: PARMETIS ERROR: sum weight for constraint 0 is zero.

Ideally parmetis should be able to recover us from empty parts. e.g. the METIS partitioner can handle and fix empty parts:

108: MeshAdapt: --fixLargeAngles       in 0.279525 seconds: #bad elements 2146                 
108: APF warning: 1 empty parts
108: 
108: MeshAdapt: --fixShortEdgeElements in 5.058107 seconds: #bad elements 1113
108: METIS: weights are not supported
108: METIS: localized graph in 0.005991 seconds 
108: METIS: partitioned in 0.003824 seconds
108: METIS: fixing up mapping
108: METIS: remapped in 0.000148 seconds
108: METIS: scattered in 0.000097 seconds
108: METIS: planned in 0.000120 seconds
108: METIS: migrated in 0.058503 seconds
108: METIS: balanced in 0.088204 seconds
108: 
108: MeshAdapt: --percent change in number of bad elements 0.600646

bobpaw avatar Sep 11 '25 15:09 bobpaw

I think avoiding empty parts is better than relying on a partitioner to fix them. IIRC, some zoltan balancing methods can create empty parts.

cwsmith avatar Sep 11 '25 15:09 cwsmith