Skip to content

Repo - BUGFIX - Name the GPEC version that wrote a gpec.h5 and the ways forward when it cannot be replayed - #642

Merged
matt-pharr merged 1 commit into
developfrom
bugfix/rerun-version-guidance
Nov 2, 2026
Merged

matt-pharr merged 1 commit into
developfrom
bugfix/rerun-version-guidance

Conversation

@logan-nc

@logan-nc logan-nc commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Release note

  • Audience: users
  • Numerical impact: none (harness @ f0756eb)
  • Migration: none

When GPEC cannot replay a gpec.h5, or equilibrium_from_h5 cannot restore one, the error now says which GPEC version wrote the file and which version is running, and gives two ways forward. The first is to check out the version that wrote the file (the commit comes from Info/git_version). The second is to run the file's stored deck with the current version, using a copy-paste command that writes the deck out. Before, the error said only "re-run from the original deck", which assumed the user still had the deck and did not say which version would replay the file.

Changes

  • Rerun (Rerun.jl):
    • Every refusal now ends with the same guidance: a stored deck with retired keys, no stored deck, and a kinetic profile or wall file named without its saved copy.
    • The error for retired keys keeps each key's advice (for example, which flag replaces rlar_flag), because whoever runs the stored deck needs it.
    • The checkout option is left out when the file does not record its version. When the build that wrote the file had uncommitted changes, the error says its results may not reproduce exactly. The run-the-deck option is left out when the file has no stored deck.
  • git describe is read in one helper, _gpec_git_version, which replaces the two copies of that code.

Example:

/data/run1/gpec.h5 cannot be replayed by this GPEC version because its stored deck is out of date:
  [KineticForces] sets keys that moved: `rlar_flag` (removed; the large-aspect-ratio methods are not ported, use fgar_flag or tgar_flag)
The file was written by GPEC v1.5.0-412-gabc1234; this is GPEC 8dcd34f70. To continue, either:
  - Replay it with the version that wrote it: in your GPEC clone run `git checkout abc1234` and `julia --project -e 'using Pkg; Pkg.instantiate()'`, then replay the file again. Return with `git checkout -` when done.
  - Run its deck with this version: from your GPEC clone, write the deck the file stores to /data/run1/stored_deck with
      julia --project -e 'using HDF5; mkpath("/data/run1/stored_deck"); write("/data/run1/stored_deck/gpec.toml", h5read("/data/run1/gpec.h5", "Input/gpec_toml_raw"))'
    and run that directory. The deck reads its input files from the paths the original run used, and GPEC names any key it must change.

Tests

  • The test for a stored deck with retired keys now also sets a recorded version with uncommitted changes. It checks that the error keeps the key's advice, names that version, gives the commit to check out, warns about the uncommitted changes, and includes the command that writes out the deck.
  • New table test: a recorded version (an exact tag, a version after a tag, a bare commit, or unknown) maps to the right thing to check out.

Regression report

Pending: queued on feynman. This change touches only error text, so no tracked quantity can move. I will post the report and update the stamp when the run finishes.

Notes for reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_0186CLfjeJeSusNTva5RMfGU

…ys forward when it cannot be replayed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0186CLfjeJeSusNTva5RMfGU
@logan-nc logan-nc added this to the GPEC v2.0.0 milestone Nov 2, 2026
@logan-nc
logan-nc requested a review from matt-pharr November 2, 2026 13:23
@github-actions github-actions Bot added the bugfix Something was wrong and now is not label Nov 2, 2026
@matt-pharr
matt-pharr merged commit e02fbe4 into develop Nov 2, 2026
20 checks passed
@matt-pharr
matt-pharr deleted the bugfix/rerun-version-guidance branch November 2, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something was wrong and now is not

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants