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

Jgfouca/e3sm cime fixes #4744

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CIME/SystemTests/eri.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def run_phase(self):

ninst = self._case.get_value("NINST")
drvrest = "rpointer.cpl"
if ninst > 1:
if ninst is not None and ninst > 1:
drvrest += "_0001"
drvrest += self._rest_time
self._set_drv_restart_pointer(drvrest)
Expand Down Expand Up @@ -288,7 +288,7 @@ def run_phase(self):
self._case.set_value("HIST_OPTION", stop_option)
self._case.set_value("HIST_N", hist_n)
drvrest = "rpointer.cpl"
if ninst > 1:
if ninst is not None and ninst > 1:
drvrest += "_0001"
drvrest += self._rest_time

Expand Down
2 changes: 1 addition & 1 deletion CIME/SystemTests/restart_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _case_two_setup(self):
self._case.set_value("REST_OPTION", "never")
ninst = self._case.get_value("NINST")
drvrest = "rpointer.cpl"
if ninst > 1:
if ninst is not None and ninst > 1:
drvrest += "_0001"
drvrest += self._rest_time
self._set_drv_restart_pointer(drvrest)
6 changes: 6 additions & 0 deletions CIME/SystemTests/system_tests_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ def _set_restart_interval(
if ncpl and minncpl < ncpl:
minncpl = ncpl

comp_interface = self._case.get_value("COMP_INTERFACE")
# mct doesn't care about maxncpl so set it to minncpl
if comp_interface == "mct":
maxncpl = minncpl

ncpl_base_period = self._case.get_value("NCPL_BASE_PERIOD")
if ncpl_base_period == "hour":
coupling_secs = 3600 / maxncpl
Expand Down Expand Up @@ -187,6 +192,7 @@ def _set_restart_interval(
else:
expect(False, f"stop_option {stop_option} not available for this test")
stop_n = int(stop_n * factor // coupling_secs)

rest_n = math.ceil((stop_n // 2 + 1) * coupling_secs / factor)
expect(stop_n > 0, "Bad STOP_N: {:d}".format(stop_n))
expect(stop_n > 2, "ERROR: stop_n value {:d} too short".format(stop_n))
Expand Down
Loading