Skip to content

Handle same file error#2921

Merged
ekluzek merged 17 commits into
ESCOMP:b4b-devfrom
jedwards4b:handle_same_file_error
Feb 1, 2025
Merged

Handle same file error#2921
ekluzek merged 17 commits into
ESCOMP:b4b-devfrom
jedwards4b:handle_same_file_error

Conversation

@jedwards4b

@jedwards4b jedwards4b commented Jan 2, 2025

Copy link
Copy Markdown
Contributor

Description of changes

In some cases of the ssp test the file to copy already exists (when run twice for example)
this leads to an error in shutil.copy. Use a try except clause to avoid this error.

Specific notes

This fix may require ESMCI/cime#4727

Contributors other than yourself, if any:

CTSM Issues Fixed:
Fixes #2913
Fixes #2920

Are answers expected to change (and if so in what way)? NO

Any User Interface Changes (namelist or namelist defaults changes)? NONE

Does this create a need to change or add documentation? Did you do so?

Testing performed, if any: SSP_Ld4.f09_g17.I1850Clm50BgcCrop.derecho_intel.clm-ciso_rtmColdSSP

@ekluzek ekluzek self-assigned this Jan 14, 2025
@ekluzek ekluzek added enhancement new capability or improved behavior of existing capability b4b bit-for-bit labels Jan 14, 2025
@ekluzek ekluzek added this to the cesm3_0_beta06 milestone Jan 14, 2025
@ekluzek

ekluzek commented Jan 15, 2025

Copy link
Copy Markdown
Contributor

This is working for the SSP tests, but the SSPMATRIX test that's more complex is not. I first thought that the rpointer updates for at least the cpl need the rest_time to get the right file for DRV_RESTART_POINTER. There's some code in system_test_common.py that I could copy to do that. But, then I realized that the rpointer files for these cases, may not need to be copied for these cases as they aren't continue runs. Previously it was copying ALL of the rpointer files with the generic dates that just meant one file per component, but now with timestamps it could be a bunch for each time restarts are written.

Copy the logic from other CIME SystemTests about setting the
driver rpointer file
for branch run types.
(requires setting the file and DRV_RESTART_POINTER xml variable).

@jedwards4b jedwards4b left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - you just need to run black on cime_config/SystemTests/sspmatrixcn.py

@ekluzek ekluzek merged commit 28501f7 into ESCOMP:b4b-dev Feb 1, 2025
@ekluzek ekluzek deleted the handle_same_file_error branch February 1, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

b4b bit-for-bit enhancement new capability or improved behavior of existing capability

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

rpointer.cpl bug causes ctsm restart to fail SSP/SSPMATRIX test problems with new case github workflow

2 participants