-
Notifications
You must be signed in to change notification settings - Fork 210
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
avoid a problem with pio_typename in clone with keepexe #1305
avoid a problem with pio_typename in clone with keepexe #1305
Conversation
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.
Looks good, Jim. I have one inline comment suggesting being more explicit in the warning.
It seems like, in theory, we could use the same mechanism in system_tests_compare_two for all clones - i.e., in the particular circumstances where this problem arises (a clone with --keep-exe?), the clone case could query its origin case for the *PIO_TYPENAME*
values and update its own values appropriately. But I imagine that's more work than is warranted right now, so I'm fine with your current solution.
scripts/lib/CIME/case.py
Outdated
@@ -1006,6 +1006,10 @@ def create_clone(self, newcase, keepexe=False, mach_dir=None, project=None, cime | |||
orig_exeroot = self.get_value("EXEROOT") | |||
newcase.set_value("EXEROOT", orig_exeroot) | |||
newcase.set_value("BUILD_COMPLETE","TRUE") | |||
orig_bld_complete = self.get_value("BUILD_COMPLETE") | |||
if not orig_bld_complete: | |||
logger.warn("\nWARNING: Creating a clone before building the original case may cause PIO_TYPENAME to be invalid in the clone") |
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.
My understanding from #1304 is that this is only a problem if the clone uses --keep-exe
. Is that true? If so, I think the warning should say this explicitly, so that it's more clear when you do and do not have to worry about this warning.
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.
The warning is only printed if you use --keepexe
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've updated the warning to include --keepexe
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.
Ah, sorry I missed that (the conditional was just above github's context - now I see that). Anyhow, I like your new wording - thanks.
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.
Two problems.
- In the clone, the valid_values is not updated so a user could easily set the PIO_TYPENAME_ to a non-valid value. This should be fixed.
- (and this may be a bigger problem) The valid_values is not enforced for PIO_TYPENAME. With a valid_values of only netcdf, ./xmlchange happily let me change the value to pnetcdf. I may open a separate issue for this.
cc80e02
to
a6b4e2a
Compare
@gold2718: I have fixed the issue of checking against valid_values. |
The best solution would be to set |
Whether the user has supplied the proper netcdf and pnetcdf libraries is not a compiler limitation and is determined during the pio build phase. I would ask that you accept this PR as an improvement and open another issue if you feel that this issue has not been fully addressed. |
Maybe it's not strictly a compiler limitation (bad phrasing on my part) but it is a feature of the CIME support for a machine (e.g., |
I did consider that but it would require rewriting the system_test_compare_two. |
Hmmm, tricky. I sympathize with @gold2718 's point here, but @jedwards4b raises a good point that @gold2718 's suggestion:
will require a massive overhaul of So my conclusion would be: For now, I'd say the current warning is sufficient; if this seems to bite people in practice, then we should revisit it. |
@gold2718 @jedwards4b @billsacks At this point I agree with Bill. I think that an additional statement in create_clone --help stating that for the --keepexe option you MUST have built the reference executable first would be really helpful. Could we please add that new documentation to this PR and then go ahead and merge it. |
Sorry, I keep getting interrupted. |
Rerunning scripts regression tests now, will merge upon completion. |
Allow the case.st_archive script to work with mpaso and mpascice history and restart files. Also should work with mpasli but not tested. From the case directory, executing ./case.st_archive should move all history and restart files to the short term archive for all ACME components. Fixes #1305 S2-131 #close [BFB] * rljacob/cime/fix-mpas-starchive: fix mpas pattern matching so only interim restart files are deleted Add ability to archive MPAS land ice files Add ability to handle mpas files Change regex for mpaso and mpascice files
Short Term Archiving Features This implements features to the short term archiver to enable running it while the model is without obviously breaking things (see #1503 for potential issues with the --last-date option). Other options added include --copy-only, which copies the files to be archived instead of moving them; and --no-incomplete-logs, which ignores logs which are not gzipped, and thus not complete Fixes #1305 Passes scripts_regression_tests BFB * origin/mfdeakin-sandia/in_run_archive: Adds the --force-move option and implies --copy-only when --last-date is specified without --force-move Adds a warning when using the --last-date option and to its help Implement the copy_only option for short term archiving. This copies files rather than moving them Implemented most of the machinery for testing with "incomplete" log files Fix code format issue - replace unused variable with _ Update template.st_archive Adds options to the st_archive to specify the last date (--last-date) to archive, and whether to disable archiving incomplete log files (--no-incomplete-logs)
Allow the case.st_archive script to work with mpaso and mpascice history and restart files. Also should work with mpasli but not tested. From the case directory, executing ./case.st_archive should move all history and restart files to the short term archive for all ACME components. Fixes #1305 S2-131 #close [BFB] * rljacob/cime/fix-mpas-starchive: fix mpas pattern matching so only interim restart files are deleted Add ability to archive MPAS land ice files Add ability to handle mpas files Change regex for mpaso and mpascice files
Short Term Archiving Features This implements features to the short term archiver to enable running it while the model is without obviously breaking things (see #1503 for potential issues with the --last-date option). Other options added include --copy-only, which copies the files to be archived instead of moving them; and --no-incomplete-logs, which ignores logs which are not gzipped, and thus not complete Fixes #1305 Passes scripts_regression_tests BFB * origin/mfdeakin-sandia/in_run_archive: Adds the --force-move option and implies --copy-only when --last-date is specified without --force-move Adds a warning when using the --last-date option and to its help Implement the copy_only option for short term archiving. This copies files rather than moving them Implemented most of the machinery for testing with "incomplete" log files Fix code format issue - replace unused variable with _ Update template.st_archive Adds options to the st_archive to specify the last date (--last-date) to archive, and whether to disable archiving incomplete log files (--no-incomplete-logs)
Allow the case.st_archive script to work with mpaso and mpascice history and restart files. Also should work with mpasli but not tested. From the case directory, executing ./case.st_archive should move all history and restart files to the short term archive for all ACME components. Fixes #1305 S2-131 #close [BFB] * rljacob/cime/fix-mpas-starchive: fix mpas pattern matching so only interim restart files are deleted Add ability to archive MPAS land ice files Add ability to handle mpas files Change regex for mpaso and mpascice files
Short Term Archiving Features This implements features to the short term archiver to enable running it while the model is without obviously breaking things (see #1503 for potential issues with the --last-date option). Other options added include --copy-only, which copies the files to be archived instead of moving them; and --no-incomplete-logs, which ignores logs which are not gzipped, and thus not complete Fixes #1305 Passes scripts_regression_tests BFB * origin/mfdeakin-sandia/in_run_archive: Adds the --force-move option and implies --copy-only when --last-date is specified without --force-move Adds a warning when using the --last-date option and to its help Implement the copy_only option for short term archiving. This copies files rather than moving them Implemented most of the machinery for testing with "incomplete" log files Fix code format issue - replace unused variable with _ Update template.st_archive Adds options to the st_archive to specify the last date (--last-date) to archive, and whether to disable archiving incomplete log files (--no-incomplete-logs)
Print a warning if create_clone is run before case1 is built. Add code to system_tests_compare_two to update pio_typename in case2 after case1 build is complete.
Test suite: scripts_regression_tests
Test baseline:
Test namelist changes:
Test status: bit for bit
Fixes #1304
User interface changes?:
Code review: