Skip to content

ENH: Record which muTopOpt and which muGrid produced a run - #12

Merged
pastewka merged 1 commit into
mainfrom
enh/run-provenance
Sep 16, 2026
Merged

pastewka merged 1 commit into
mainfrom
enh/run-provenance

Conversation

@pastewka

Copy link
Copy Markdown
Contributor

A result is only interpretable against the build that produced it: the numerics live in muGrid, and a muGrid change can move CG iteration counts on its own (the block-count cap in 1.1.1's GPU reductions reorders every dot product above 64^3, for instance). Historic runs recorded neither version, so two logs that disagree cannot be attributed.

muGrid stamps a git-derived version into its build; muTopOpt's version is a hand-written constant that does not move between commits, so version.py derives the commit from the checkout instead, and marks a dirty working tree -- a run from modified sources is not reproducible from its commit alone.

Both banners now print right after the solver is constructed, ahead of the target checks and the restart read, so a run that dies in setup still says what it was. They are also written to the output file next to command_line: that attribute records what was asked for, these record what ran it. The file's copies deliberately carry no communicator or device -- those make muGrid's string rank-dependent (rank 2/4, device cuda:2), and a global attribute is written collectively.

A result is only interpretable against the build that produced it: the
numerics live in muGrid, and a muGrid change can move CG iteration counts
on its own (the block-count cap in 1.1.1's GPU reductions reorders every
dot product above 64^3, for instance). Historic runs recorded neither
version, so two logs that disagree cannot be attributed.

muGrid stamps a git-derived version into its build; muTopOpt's
__version__ is a hand-written constant that does not move between
commits, so version.py derives the commit from the checkout instead, and
marks a dirty working tree -- a run from modified sources is not
reproducible from its commit alone.

Both banners now print right after the solver is constructed, ahead of
the target checks and the restart read, so a run that dies in setup still
says what it was. They are also written to the output file next to
command_line: that attribute records what was asked for, these record
what ran it. The file's copies deliberately carry no communicator or
device -- those make muGrid's string rank-dependent (rank 2/4, device
cuda:2), and a global attribute is written collectively.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pastewka
pastewka merged commit 76e871c into main Sep 16, 2026
7 of 8 checks passed
@pastewka
pastewka deleted the enh/run-provenance branch September 16, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant