From e2f6e81d081ef82bd434748c5252b50d2f0e79fa Mon Sep 17 00:00:00 2001 From: manishvenu Date: Wed, 3 Jun 2026 14:00:39 -0600 Subject: [PATCH 1/3] Auto-select PECOUNT from active ocean points at case init Adds _compute_pecount() to Case, which counts active ocean cells from ocn_topo.tmask and maps them to a CIME pecount tier (XS/S/M/L) using pts/core benchmarks from tx2_3v3 (170 pts/core without MARBL, 60 pts/core with MARBL). Sets cvars["PECOUNT"] in _configure_launch() so create_newcase receives the appropriate --pecount flag. Also bumps the visualCaseGen submodule to the add_pecount_arg branch which adds PECOUNT cvar support to visualCaseGen. --- CrocoDash/case.py | 25 +++++++++++++++++++++++++ CrocoDash/visualCaseGen | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CrocoDash/case.py b/CrocoDash/case.py index a92c551d..51fe2199 100644 --- a/CrocoDash/case.py +++ b/CrocoDash/case.py @@ -4,6 +4,7 @@ from datetime import datetime import json import importlib.util +import math import pandas as pd import regional_mom6 as rmom6 from CrocoDash.grid import Grid @@ -860,6 +861,29 @@ def _configure_custom_runoff_grid(self, rof_grid_name): "skip" # to be generated later in process_forcings ) + def _compute_pecount(self): + """Compute the CIME pecount tier based on active ocean points and compset. + + Uses target pts/core ratios derived from tx2_3v3 benchmarks: + - without MARBL: ~170 pts/core + - with MARBL: ~60 pts/core + + MOM6 is allocated full Derecho nodes (128 cores each). The tier string + maps nodes_needed → CIME --pecount keyword. + """ + TASKS_PER_NODE = 128 + pts_per_core = 60 if self.bgc_in_compset else 170 + ocean_pts = int(self.ocn_topo.tmask.sum()) + nodes_needed = math.ceil(ocean_pts / (pts_per_core * TASKS_PER_NODE)) + if nodes_needed < 1: + return "XS" + elif nodes_needed == 1: + return "S" + elif nodes_needed <= 3: + return "M" + else: + return "L" + def _configure_launch(self): """Assign the launch variables for the case.""" @@ -871,6 +895,7 @@ def _configure_launch(self): # Variables that are not included in a stage: cvars["NINST"].value = self.ninst + cvars["PECOUNT"].value = self._compute_pecount() def _apply_final_xmlchanges( self, ntasks_ocn=None, job_queue=None, job_wallclock_time=None diff --git a/CrocoDash/visualCaseGen b/CrocoDash/visualCaseGen index cd2103ca..2cd3f100 160000 --- a/CrocoDash/visualCaseGen +++ b/CrocoDash/visualCaseGen @@ -1 +1 @@ -Subproject commit cd2103cad15b9506fb9c30eb3ab647512808688c +Subproject commit 2cd3f100915696bfff31c435054047611a456b89 From 302a6db0f27bfe0df93048b40f58f0326206cec8 Mon Sep 17 00:00:00 2001 From: manishvenu Date: Wed, 3 Jun 2026 14:03:40 -0600 Subject: [PATCH 2/3] Remove unicode arrow from docstring --- CrocoDash/case.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CrocoDash/case.py b/CrocoDash/case.py index 51fe2199..f30e00ff 100644 --- a/CrocoDash/case.py +++ b/CrocoDash/case.py @@ -869,7 +869,7 @@ def _compute_pecount(self): - with MARBL: ~60 pts/core MOM6 is allocated full Derecho nodes (128 cores each). The tier string - maps nodes_needed → CIME --pecount keyword. + maps nodes_needed to CIME --pecount keyword. """ TASKS_PER_NODE = 128 pts_per_core = 60 if self.bgc_in_compset else 170 From f611e4fa2b289be3421ad0ca20278ed29495b419 Mon Sep 17 00:00:00 2001 From: manishvenu Date: Wed, 3 Jun 2026 14:07:08 -0600 Subject: [PATCH 3/3] This --- CrocoDash/rm6 | 2 +- CrocoDash/visualCaseGen | 2 +- demos | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CrocoDash/rm6 b/CrocoDash/rm6 index 78f768d1..d8197ce0 160000 --- a/CrocoDash/rm6 +++ b/CrocoDash/rm6 @@ -1 +1 @@ -Subproject commit 78f768d1626451d595469124a86c607dc0dcf3b7 +Subproject commit d8197ce0bad05d8ea08d6e7d4a7453ccb8551945 diff --git a/CrocoDash/visualCaseGen b/CrocoDash/visualCaseGen index 2cd3f100..185ad30e 160000 --- a/CrocoDash/visualCaseGen +++ b/CrocoDash/visualCaseGen @@ -1 +1 @@ -Subproject commit 2cd3f100915696bfff31c435054047611a456b89 +Subproject commit 185ad30e05dde50bc48ce1f2cf4f58fb8d096847 diff --git a/demos b/demos index 7709a4bd..2f6ce37b 160000 --- a/demos +++ b/demos @@ -1 +1 @@ -Subproject commit 7709a4bd904e686eee1e6b5ba93cdb0192ad3c1b +Subproject commit 2f6ce37b1ac1aaa04ebe6d64c2d21faef9f80348