Skip to content

Fix checkpoint restart file check for single-process runs#200

Merged
The9Cat merged 4 commits into
RestartFixHDF5from
copilot/sub-pr-198
Feb 4, 2026
Merged

Fix checkpoint restart file check for single-process runs#200
The9Cat merged 4 commits into
RestartFixHDF5from
copilot/sub-pr-198

Conversation

Copilot AI commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

The checkpoint restart sanity check hard-coded a ".1" suffix, but Run() only appends rank suffixes when numprocs>1. Single-process restarts would always fail.

Changes

  • src/OutHDF5.cc (lines 196-199): Added conditional rank suffix logic matching Run():
    if (chkpt) {
      fname << outdir << "checkpoint_" << runtag;
      if (numprocs>1) fname << ".1";  // Only append rank for multi-process
    }

Now checks for checkpoint_<runtag> in single-process runs and checkpoint_<runtag>.1 in multi-process runs, consistent with how files are written in Run() (lines 309-312).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update checkpoint restart for OutHDF5 implementation Fix checkpoint restart file check for single-process runs Feb 4, 2026
Copilot AI requested a review from The9Cat February 4, 2026 14:54

@The9Cat The9Cat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@The9Cat The9Cat marked this pull request as ready for review February 4, 2026 15:01
@The9Cat The9Cat merged commit 3c25d76 into RestartFixHDF5 Feb 4, 2026
@michael-petersen michael-petersen deleted the copilot/sub-pr-198 branch February 17, 2026 13:49
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.

2 participants