Skip to content

Commit

Permalink
Merge pull request #4669 from jedwards4b/systemtest_restart_fix
Browse files Browse the repository at this point in the history
fix the restart tests by using ceil instead of int
  • Loading branch information
jedwards4b committed Aug 29, 2024
2 parents b1e3f8c + c53f13c commit d70af96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CIME/SystemTests/system_tests_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
)
import CIME.build as build

import glob, gzip, time, traceback, os
import glob, gzip, time, traceback, os, math
from contextlib import ExitStack

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -173,8 +173,8 @@ def _set_restart_interval(self):
else:
expect(False, f"stop_option {stop_option} not available for this test")

stop_n = int(stop_n * factor // coupling_secs)
rest_n = int((stop_n // 2 + 1) * coupling_secs / factor)
stop_n = 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))

Expand Down

0 comments on commit d70af96

Please sign in to comment.