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

'decomp' test is not re-runnable #601

Closed
phil-blain opened this issue May 20, 2021 · 3 comments · Fixed by #610
Closed

'decomp' test is not re-runnable #601

phil-blain opened this issue May 20, 2021 · 3 comments · Fixed by #610
Assignees

Comments

@phil-blain
Copy link
Member

I've noticed the 'decomp' test in the base suite does not work well if the suite is submitted more than once, i.e.

./cice.setup --suite base_suite ...
# wait for all tests to finish
cd $suite_dir
./suite.submit

I haven't investigated further but I suspect it's something to do with the shell globbing in the test script. When the test is re-run I get a weird arboresence in the run directory where the restart folder is re-created inside each already existing restart.$decomp folder...

It's not too important but I thought I'd mention it anyway...

@apcraig

@phil-blain
Copy link
Member Author

I forgot I had already mentioned that here: #524 (comment)

@phil-blain
Copy link
Member Author

I tried simply cd-ing to the run directory, removing restart* directories (and history, just to be sure) and it does the trick. So presumably a simple addition at the end of the test script like the following would be sufficient:

diff --git i/configuration/scripts/tests/test_decomp.script w/configuration/scripts/tests/test_decomp.script
index 40b84d0..a08629b 100644
--- i/configuration/scripts/tests/test_decomp.script
+++ w/configuration/scripts/tests/test_decomp.script
@@ -129,6 +129,7 @@ foreach decomp (${decomps})
 end
 
 cp ice_in.0 ice_in
+rm -rf ${ICE_RUNDIR}/restart*
 #-----------------------------------------------------------
 
 # turn off general test features, these are done above for this test

@apcraig apcraig self-assigned this Jun 19, 2021
apcraig added a commit to apcraig/CICE that referenced this issue Jun 19, 2021
- Fix bugs in history/restart frequency associated with new calendar (CICE-Consortium#589)
- Define frequency in absolute terms relative to 0000-01-01-00000 and document (CICE-Consortium#589)
- Update set_nml.histall to include hourly output (CICE-Consortium#589)
- Update test scripts to cleanly abort if run fails where possible (CICE-Consortium#608)
- Update decomp test so it's rerunable, remove restart at start of run (CICE-Consortium#601)
- Add ability to do bfbcomp tests with additional options set on command line (CICE-Consortium#569)
- Update documentation of calendar frequency computation, calendar types, and closed boundaries (CICE-Consortium#541)
- Add optional doabort flag to abort_ice to control whether the method aborts.  This
  is useful for testing and code coverage statistics, although doabort=.false.
  will not call the actual abort method, but we can test the interfaces and
  rest of the code.
@apcraig
Copy link
Contributor

apcraig commented Jun 19, 2021

Just a quick note that the rm seemed to work, but it was added at the top of the script instead of the bottom. We don't want to remove the restart files before the "generate" step is done because then we lose regression testing. If we put it at the top of the script, it deletes old restarts before a re-run rather than after a run is complete. Thanks @phil-blain for coming up a solution.

apcraig added a commit that referenced this issue Jul 2, 2021
* Fix history/restart frequency bugs and update scripts

- Fix bugs in history/restart frequency associated with new calendar (#589)
- Update set_nml.histall to include hourly output (#589)
- Update test scripts to cleanly abort if run fails where possible (#608)
- Update decomp test so it's rerunable, remove restart at start of run (#601)
- Add ability to do bfbcomp tests with additional options set on command line (#569)
- Update documentation of calendar frequency computation, calendar types, and closed boundaries (#541)
- Add optional doabort flag to abort_ice to control whether the method aborts.  This
  is useful for testing and code coverage statistics, although doabort=.false.
  will not call the actual abort method, but we can test the interfaces and
  rest of the code.
- Add histfreq_base and dumpfreq_base ('init' or 'zero') to specify
  reference data for history and restart output.  Defaults are
  'zero' and 'init' respectively for hist and dump.
  Setting histfreq_base to 'zero' allows for consistent output
  across multiple runs.  Setting dumpfreq_base to 'init' allows
  the standard testing which requires restarts be written,
  for example, 5 days after the start of the run.
- Remove extra abort calls in bcstchk and sumchk on runs that
  complete fine but don't pass checks.  These aborts should never
  have been there.
- Update documentation.

- Clean up some of the unit tests to better support regression testing

- modify initial/restart implementation
- restart namelist is deprecated, now computed internally
- modify initial/continue init checks and set restart and use_restart_time as needed
- create compute_relative_elapsed method in ice_calendar to improve code reuse
- update documentation with regard to initial/continue modes
- Set default use_restart_time to false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants