Skip to content

v11: Add better exit control for gcm_run.j#775

Open
mathomp4 wants to merge 4 commits intodevelopfrom
feature/v11-fix-bad-exit
Open

v11: Add better exit control for gcm_run.j#775
mathomp4 wants to merge 4 commits intodevelopfrom
feature/v11-fix-bad-exit

Conversation

@mathomp4
Copy link
Member

@mathomp4 mathomp4 commented Oct 27, 2025

Closes #774

This is an attempt to try to have better exit control from gcm_run.j


Closes #818

In re #818, this PR tries to update all the "bad" exit calls in gcm_run.j to have a non-zero status. Hopefully this leads to better trapping with cylc, et al.

cc: @Dooruk

@mathomp4 mathomp4 added the 0 diff The changes in this pull request have verified to be zero-diff with the target branch. label Oct 27, 2025
@Dooruk
Copy link

Dooruk commented Mar 3, 2026

I'm testing with this, my code failed gracefully this time.

4222              18  18  18  18  18  18
4223 NOTE from PE     0: MOM_restart: MOM run restarted using : INPUT/MOM.res_3.nc
4224
4225 FATAL from PE     0: MOM_restart: Unable to find mandatory variable age in restart files.
4226
4227 GEOSgcm.x failed with return code 1

@Dooruk
Copy link

Dooruk commented Mar 3, 2026

Welp, I'm testing with v12 but no reason for this not to work for v11?

@mathomp4 mathomp4 marked this pull request as ready for review March 5, 2026 19:53
@mathomp4 mathomp4 requested a review from a team as a code owner March 5, 2026 19:53
@mathomp4
Copy link
Member Author

mathomp4 commented Mar 5, 2026

Welp, I'm testing with v12 but no reason for this not to work for v11?

Yeah, it's already in v12 (#776) but now that I know it works, I've undrafted this and hopefully @sdrabenh will pull it in in the next update.

Thanks for confirming it!

@Dooruk
Copy link

Dooruk commented Mar 5, 2026

I spoke to soon, this is Cylc not capturing the error if nodes are not set properly. Cylc doesn't register that as a fail (says succeed but actually it stopped running). Should this be a separate issue (again, i'm testing with v12rc**)?:

Screenshot 2026-03-03 at 7 06 40 PM

@mathomp4
Copy link
Member Author

mathomp4 commented Mar 5, 2026

I spoke to soon, this is Cylc not capturing the error if nodes are not set properly. Cylc doesn't register that as a fail (says succeed but actually it stopped running). Should this be a separate issue (again, i'm testing with v12rc**)?:

Screenshot 2026-03-03 at 7 06 40 PM

Ugh. yeah. Make an issue. I can try and trace how that's not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0 diff The changes in this pull request have verified to be zero-diff with the target branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calling gcm_run.j via Cylc issue, exit status is not handled right gcm_run.j doesn't exit on fail

2 participants