Skip to content

mesh_metric_mismatch: rank-local A_target/A_mean sums make the returned δ moments partition-dependent #351

Description

@lmoresi

Found by the Copilot pass over Wave D PR #345 (2026-07-08); TODO(BUG) marker at src/underworld3/meshing/smoothing/metrics.py (commit 300bba4) with a fix sketch.

mesh_metric_mismatch builds A_target (and the clamp's A_mean) from rank-local sums, so under MPI the returned δ moments (rms/max/median_abs) are partition-dependent and inconsistent with the docstring's global equidistribution target. The live skip signal (alignment/misalignment used by follow_metric/mmpde) IS globally reduced and unaffected — this only mis-reports the diagnostic moments.

Fix: global reductions for the sums/counts feeding A_target/A_mean.

Underworld development team with AI support from Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions