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

ERS test failure leaves namelist in unexpected state #901

Closed
mnlevy1981 opened this issue Dec 9, 2016 · 2 comments
Closed

ERS test failure leaves namelist in unexpected state #901

mnlevy1981 opened this issue Dec 9, 2016 · 2 comments
Assignees

Comments

@mnlevy1981
Copy link
Contributor

I had the following happen with an ERS test:

  1. Test failed in the first leg of the restart
  2. I made necessary SourceMods and rebuilt / resubmitted the test
  3. TestStatus reported a failure in the namelist comparison:
2016-12-09 08:24:57: Differences in namelist 'seq_timemgr_inparm':
  BASE: history_n = -999
  COMP: history_n = 11
  BASE: history_option = 'never'
  COMP: history_option = 'ndays'
  BASE: restart_n = 11
  COMP: restart_n = 6

case.build actually threw a warning about this failure

Found difference in HIST_N: case: 11 original value -999
 Use option --force to run the test with this value or --reset to reset to original

But (as @jedwards4b pointed out in Slack) that warning message is out of date; the --force and --reset options are not available in the build script (or submit, for that matter).

I think the main cause of this failure is that case.test does not abort if the first half of a restart test fails so it makes the necessary namelist changes to launch the restart run as well; if that's an accurate assessment of the issue, throwing an exception if the first run fails and aborting before setting up the second run would be a sufficient fix.

For cases where the ERS test aborts in the second run, though (i.e. if a bug caused a variable to be omitted from a restart file but a component tried to read it anyway), there needs to be a way to reset the namelist variables... ideally case.test would call this script in case of run failures but maybe make it available to users to allow re-running of these tests. Going off the original warning I got from case.build, I think it would be nice to be able to run

$ ./case.test --reset

to reset the XML variables to their expected values at the beginning of a test. (This approach would make it easy for case.test to call this routine when a run fails as well.)

@mvertens
Copy link
Contributor

mvertens commented Dec 9, 2016 via email

@jedwards4b
Copy link
Contributor

I believe that all of the issues of this PR have been addressed as of the current master.

@ghost ghost removed the in progress label May 10, 2017
jgfouca added a commit that referenced this issue May 10, 2017
Reset test case

adds a case.test --reset option to manually reset a test to initial conditions, also adds a teardown method to system_tests_common.py which assures that RUN_WITH_SUBMIT flag is reset to False
whenever a test method exits.

Test suite: scripts_regression_tests.py ERR.f09_g16.B1850.cheyenne_intel.allactive-defaultio
Test baseline:
Test namelist changes:
Test status: bit for bit
Fixes #901

User interface changes?: Add --reset option to case.test

Code review: jgfouca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants