Skip to content

Rank-asymmetric temporary variable names in _vector_stats/_tensor_stats (_temp_mag_{id(self)}) #384

Closed

Description

@lmoresi

Found while building the #379 synchronised_array_update rework (PR #383).

_vector_stats and _tensor_stats (discretisation_mesh_variables.py) create temporary mesh variables named _temp_mag_{id(self)} / _temp_frob_{id(self)}. id() is a rank-local memory address, so these variable names differ across ranks. Variable creation and deletion perform collective DM operations keyed by field name, and the variables are written inside uw.synchronised_array_update — any code path that uses the NAME as a cross-rank key breaks on them. This is also why the #379 collective flush uses creation-order registration ids rather than names.

Fix direction: derive the suffix from something rank-symmetric (a per-mesh monotonically increasing counter, or the parent variable's clean_name).

Underworld development team with AI support from Claude Code

Activity

  1. lmoresi commented on Jul 23, 2026

    @lmoresi
    MemberAuthor

    Fixed by PR #401 (stats temporaries use the rank-symmetric clean_name suffix, with a collision refusal guard), merged to development on 2026-07-23 after a public adversarial review round. (Manual close — PRs target development, so auto-close does not fire.)

    Underworld development team with AI support from Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions