-
Notifications
You must be signed in to change notification settings - Fork 54
AD Debug Option to set a FAIL point #3031
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
Conversation
|
@bartgol , how does the I also need to add a unit test for this new capability. I'm posting now so I can solicit feedback sooner than later. |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Using Repos:
Pull Request Author: AaronDonahue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! 🚀
👼 😈 🤹♂️
Two minor comments that shouldn't impact whether or not to merge, so pls feel free to ignore them
</file> | ||
<file name="data/scream_input.yaml" format="yaml"> | ||
<sections>driver_options,iop_options,atmosphere_processes,grids_manager,initial_conditions,Scorpio,e3sm_parameters</sections> | ||
<sections>driver_debug_options,driver_options,iop_options,atmosphere_processes,grids_manager,initial_conditions,Scorpio,e3sm_parameters</sections> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: I would prefer we list these vertically... is something like this acceptable in xml?
<sections>
driver_debug_options,
driver_options,
iop_options,
atmosphere_processes,
grids_manager,
initial_conditions,
Scorpio,
e3sm_parameters
</sections>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mahf708 I don't think it is trivial. I tried with just the above and hit an XML error. I tried a Google search and it looks like it is up to the interpreter if it catches the line breaks. So we may be stuck with a single long line for now. Although I agree it would be easier to read if we could break it down into multiple lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the issue may be in how we parse the XML node content to generate the yaml/nml files during buildnml. We may be able to modify that code, so that a,\n b
is treated the same as a,b
. But probably not in this PR.
Status Flag 'Pull Request AutoTester' - Jenkins Testing: 1 or more Jobs FAILED Note: Testing will normally be attempted again in approx. 2 Hrs. If a change to the PR source branch occurs, the testing will be attempted again on next available autotester run. Pull Request Auto Testing has FAILED (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
SCREAM_PullRequest_Autotester_Weaver # 6115 PASSED (click to see last 100 lines of console output)
SCREAM_PullRequest_Autotester_Mappy # 5881 FAILED (click to see last 100 lines of console output)
|
start_timer("EAMxx::run"); | ||
|
||
// DEBUG option: Check if user has set the run to fail at a specific timestep. | ||
if (m_atm_params.isSublist("driver_debug_options")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to check if a sublist exists, imho. If you grab it, but did not exist, it will get created (empty). But adding the debug sublist is not really an issue, and arguably the code is easier to parse.
And I agree with Naser, that the line below is prob too long. You could do this:
auto& debug = m_atm_params.sublist("driver_debug_options");
auto fail_step = debug.get<int>("force_fail_at_step",-1);
if (fail_step==m_current_ts.get_num_steps()) {
std::abort();
}
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Using Repos:
Pull Request Author: AaronDonahue |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
|
This commit will add a new sub-parameter list for the AD that will control debug options that would not typically be run for a model simulation.
The first application of the new DEBUG parameters is to add an option to force an
abort
at the driver level at a specific time step. The new option is calledforce_crash_nsteps
and will force the AD to abort once a specific timestep is reached.