Skip to content

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

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

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

Conversation

Copy link

Copilot AI commented Feb 4, 2026

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 and others added 3 commits February 4, 2026 14:52
Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
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
Copy link
Member

@The9Cat The9Cat left a comment

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
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