Skip to content

Commit

Permalink
fix some division
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Oct 10, 2017
1 parent cfbe500 commit db0d7f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/lib/CIME/SystemTests/dae.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _case_two_setup(self):
self._case.set_value("DATA_ASSIMILATION_CYCLES", 2)
stopn = self._case.get_value("STOP_N")
expect((stopn % 2) == 0, "ERROR: DAE test requires that STOP_N be even")
stopn = stopn / 2
stopn = int(stopn / 2)
self._case.set_value("STOP_N", stopn)

self._case.flush()
Expand Down
6 changes: 3 additions & 3 deletions scripts/lib/CIME/SystemTests/eri.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@ def run_phase(self):
stop_option = self._case.get_value("STOP_OPTION")
run_startdate = self._case.get_value("RUN_STARTDATE")

stop_n1 = stop_n / 6
stop_n1 = int(stop_n / 6)
rest_n1 = stop_n1
start_1 = run_startdate

stop_n2 = stop_n - stop_n1
rest_n2 = stop_n2 / 2 + 1
rest_n2 = int(stop_n2 / 2 + 1)
hist_n = stop_n2

start_1_year, start_1_month, start_1_day = [int(item) for item in start_1.split("-")]
start_2_year = start_1_year + 2
start_2 = "{:04d}-{:02d}-{:02d}".format(start_2_year, start_1_month, start_1_day)

stop_n3 = stop_n2 - rest_n2
rest_n3 = stop_n3 / 2 + 1
rest_n3 = int(stop_n3 / 2 + 1)

stop_n4 = stop_n3 - rest_n3

Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/CIME/SystemTests/pet.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def _case_two_setup(self):
# machines, if the mpiexec tries to exceed the procs-per-node that were given
# to the batch submission, things break. Setting MAX_TASKS_PER_NODE to half of
# it original value prevents this.
self._case.set_value("MAX_TASKS_PER_NODE", self._case.get_value("MAX_TASKS_PER_NODE") / 2)
self._case.set_value("MAX_TASKS_PER_NODE", int(self._case.get_value("MAX_TASKS_PER_NODE") / 2))

# Need to redo case_setup because we may have changed the number of threads
case_setup(self._case, reset=True)

0 comments on commit db0d7f9

Please sign in to comment.