Skip to content

Commit

Permalink
address the rest of the restart tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Aug 21, 2024
1 parent 081969f commit e4980a2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion CIME/SystemTests/err.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def __init__(self, case, **kwargs): # pylint: disable=super-init-not-called
def _case_one_setup(self):
super(ERR, self)._case_one_setup()
self._case.set_value("DOUT_S", True)
self._rest_n = self._set_restart_interval()

def _case_two_setup(self):
super(ERR, self)._case_two_setup()
Expand Down
3 changes: 2 additions & 1 deletion CIME/SystemTests/restart_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def __init__(
def _case_one_setup(self):
stop_n = self._case1.get_value("STOP_N")
expect(stop_n >= 3, "STOP_N must be at least 3, STOP_N = {}".format(stop_n))

self._set_restart_interval()

def _case_two_setup(self):
rest_n = self._case1.get_value("REST_N")
stop_n = self._case1.get_value("STOP_N")
Expand Down
3 changes: 2 additions & 1 deletion CIME/SystemTests/system_tests_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ def __init__(
self._dry_run = False
self._user_separate_builds = False
self._expected_num_cmp = None

self._rest_n = None

def _set_restart_interval(self):
stop_n = self._case.get_value("STOP_N")
stop_option = self._case.get_value("STOP_OPTION")
Expand Down
2 changes: 2 additions & 0 deletions CIME/case/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def __init__(self, case_root=None, read_only=True, record=False, non_local=False
# Command Line user_mods are handled seperately

# Derived attributes
self.mem_per_node = None
self.thread_count = None
self.total_tasks = None
self.tasks_per_node = None
Expand Down Expand Up @@ -265,6 +266,7 @@ def initialize_derived_attributes(self):
self.tasks_per_node = env_mach_pes.get_tasks_per_node(
self.total_tasks, self.thread_count
)
self.mem_per_node = 230 / max_mpitasks_per_node * self.tasks_per_node

self.num_nodes, self.spare_nodes = env_mach_pes.get_total_nodes(
self.total_tasks, self.thread_count
Expand Down
2 changes: 0 additions & 2 deletions CIME/data/config/config_tests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ NODEFAIL Tests restart upon detected node failure. Generates fake failu
<INFO_DBUG>1</INFO_DBUG>
<STOP_OPTION>ndays</STOP_OPTION>
<STOP_N>7</STOP_N>
<REST_N>$STOP_N / 2 + 1</REST_N>
<REST_OPTION>$STOP_OPTION</REST_OPTION>
<HIST_N>$STOP_N</HIST_N>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
Expand Down Expand Up @@ -539,7 +538,6 @@ NODEFAIL Tests restart upon detected node failure. Generates fake failu
<STOP_OPTION>nsteps</STOP_OPTION>
<OCN_NCPL>$ATM_NCPL</OCN_NCPL>
<STOP_N>11</STOP_N>
<REST_N>$STOP_N / 2 + 1</REST_N>
<REST_OPTION>$STOP_OPTION</REST_OPTION>
<HIST_N>$STOP_N</HIST_N>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
Expand Down

0 comments on commit e4980a2

Please sign in to comment.