Skip to content

Commit 5f45223

Browse files
committed
fix the issue with standard MOM6 grids:
Case creator attemps to set NTASKS_OCN for by checking OCN_NX and OCN_NY but those variables are not set for standard MOM6 grids. While we can retrieve them for standard grids too, we should still not change NTASKS for standard ocn grids, because they have associated, and optimized NTASKS values set in config_pes files.
1 parent 82ff46f commit 5f45223

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

visualCaseGen/custom_widget_types/case_creator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,8 @@ def _apply_all_xmlchanges(self, do_exec):
508508
else:
509509
assert lnd_grid_mode in [None, "", "Standard"], f"Unknown land grid mode: {lnd_grid_mode}"
510510

511-
# Set NTASKS based on grid size. e.g. NX * NY < max_pts_per_core
512-
if cvars["COMP_OCN"].value == "mom":
511+
# Set NTASKS based on grid size if custom ocn grid. e.g. NX * NY < max_pts_per_core
512+
if cvars["COMP_OCN"].value == "mom" and cvars["OCN_GRID_MODE"].value == "Custom":
513513
num_points = int(cvars["OCN_NX"].value) * int(cvars["OCN_NY"].value)
514514
cores = CaseCreator._calc_cores_based_on_grid(num_points)
515515
with self._out:

0 commit comments

Comments
 (0)