Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runfv3: Fix exit code handling #1440

Merged
merged 1 commit into from
Oct 21, 2021
Merged

runfv3: Fix exit code handling #1440

merged 1 commit into from
Oct 21, 2021

Conversation

nbren12
Copy link
Contributor

@nbren12 nbren12 commented Oct 21, 2021

Resolves #1420. see commits for more details. This bug affected the regression data since it caused the final timestep to not be saved.

This bug was caused by python objects not being cleaned up before
calling wrapper.cleanup.

This bug caused the final timestep to not be saved in the regression data.
Fixing it therefore changes the regression data.

Resolves #1420
@nbren12 nbren12 changed the title Fix-exit-code-handling runfv3: Fix exit code handling Oct 21, 2021
Copy link
Contributor

@AnnaKwa AnnaKwa left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

@nbren12 nbren12 merged commit 24f9955 into master Oct 21, 2021
@nbren12 nbren12 deleted the fix-exit-code-handling branch October 21, 2021 17:07
@oliverwm1
Copy link
Contributor

The changes in this PR confuse me. The regression test is configured to run for 30 minutes, with a 15-minute timestep. Since we save data at the end of each timestep, there should be 2 timesteps in the output data. @nbren12

@nbren12
Copy link
Contributor Author

nbren12 commented Oct 21, 2021 via email

spencerkclark added a commit that referenced this pull request Nov 8, 2023
… config (#2362)

This PR is an initial piece broken out of #2350. It adds a `wrapper`
attribute to the `UserConfig` class that is used to determine which
Python wrapper to import within the `main.py` run file. As of this PR,
the only supported option is the default `"fv3gfs.wrapper"`, but in the
abstract this adds a hook for us to ultimately also support
`"shield.wrapper"`.

Added public API:
- A `wrapper` can now be specified within a prognostic run `UserConfig`.
The only currently supported option is the default of
`"fv3gfs.wrapper"`. Because of this default, this PR is fully backwards
compatible (no need to change already-defined configs).

Significant internal changes:
- The Python wrapper is now imported within the `main` function defined
in `main.py` within the prognostic run instead of the top of the module.
- The wrapper is initialized within the `main` function, and thus after
all top-level imports. Initial tests (including with a 2x2 layout in the
cloud) suggest the odd issue that motivated the previous approach may be
resolved. Perhaps this is related to the fact that we no longer use
OpenMPI in the prognostic run image (we use MPICH). This logic had
originally been added in #706.
- The garbage collection step added in
#1440 has also been removed, since
it appears it is no longer needed.

- [x] Tests added

Coverage reports (updated automatically):
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.

FV3 exit codes not properly handled and FV3 exits 1
3 participants