Adds a type check to Omega Config#454
Merged
philipwjones merged 2 commits intoJul 2, 2026
Merged
Conversation
adds an explicit error check for a type conversion error to enable better error handling and a clearer error message
also adds the variable name to the abort message to better isolate the error
Author
|
CTests pass on PM cpu and gpu. Also tested with an edited Config with bad inputs to verify appropriate error messages are generated. |
cbegeman
approved these changes
Jul 1, 2026
cbegeman
left a comment
There was a problem hiding this comment.
@philipwjones Thanks for getting to this so quickly! I think this will be broadly helpful. Would you like me to do any additional testing?
xylar
approved these changes
Jul 2, 2026
xylar
left a comment
There was a problem hiding this comment.
Approving based on an inspection of the code. I agree, these error messages will be helpful.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a data type check to Config retrievals in order to provide a clearer error message than the generic yaml-cpp message. When yaml-cpp cannot convert to the requested data type, Omega now aborts with a clear error message that includes the offending variable name.
Fixes #444
Checklist
Testingwith the following:have been run on and indicate that are all passing.
has passed, using the Polaris
e3sm_submodules/Omegabaseline-pfor both the baseline (Polarise3sm_submodules/Omega) and the PR build