Skip to content

Improve the error message when collecting restart files.#708

Open
Qian-HuiChen wants to merge 2 commits intopayu-org:masterfrom
ACCESS-NRI:705-om3-errormsg
Open

Improve the error message when collecting restart files.#708
Qian-HuiChen wants to merge 2 commits intopayu-org:masterfrom
ACCESS-NRI:705-om3-errormsg

Conversation

@Qian-HuiChen
Copy link
Copy Markdown
Collaborator

Make the FileNotFound error message clearer when collecting restart files.

Closes #705.
Ref issue in OM3 config repo.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.72%. Comparing base (d97ecfa) to head (c6daca3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #708      +/-   ##
==========================================
+ Coverage   63.70%   63.72%   +0.02%     
==========================================
  Files          67       67              
  Lines        5554     5555       +1     
==========================================
+ Hits         3538     3540       +2     
+ Misses       2016     2015       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Qian-HuiChen
Copy link
Copy Markdown
Collaborator Author

Qian-HuiChen commented Mar 31, 2026

@manodeep @anton-seaice thanks for raising the issue!
This PR aims to make payu deliver a clearer error message to the users. You feedback/comments/suggestions are highly appreciated 🙂
Edit:
The current error message will be:

::
File "/home/.../cesm_cmeps.py", line 336, in _collect_restart_files
    raise FileNotFoundError(
FileNotFoundError:
Payu Error: Restart pointer file not found at the end of payu run: /scratch/.../100km_jra_ryf/rpointer.cpl
Possible cause: model runtime is shorter than the restart write frequency.
Fix:
    1. Remove the incomplete restart subdirectory in the archive path
    2. Adjust the restart write frequency to be shorter than/equal to the model runtime.

Copy link
Copy Markdown
Contributor

@anton-seaice anton-seaice left a comment

Choose a reason for hiding this comment

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

Possible cause: model runtime is shorter than the restart write frequency.
Fix:
1. Remove the incomplete restart subdirectory in the archive path
2. Adjust the restart write frequency to be shorter than/equal to the model runtime."""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
2. Adjust the restart write frequency to be shorter than/equal to the model runtime."""
2. Adjust the restart write frequency to write a restart at the end of the model run."""

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good. Unit test is added to confirm error message is delivered when

  1. rpointer file is missing
  2. restart files in pointer are missing

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.

Better error message for missing restart files in OM3

2 participants