diff --git a/dsl/pace/dsl/dace/orchestration.py b/dsl/pace/dsl/dace/orchestration.py index eece8847..5e5ea52a 100644 --- a/dsl/pace/dsl/dace/orchestration.py +++ b/dsl/pace/dsl/dace/orchestration.py @@ -175,9 +175,8 @@ def _build_sdfg( memory_pooled += arr.total_size * arr.dtype.bytes arr.lifetime = dace.AllocationLifetime.Scope memory_pooled = float(memory_pooled) / (1024 * 1024) - DaCeProgress.log( - DaCeProgress.default_prefix(config), - f"Pooled {memory_pooled} mb", + pace_log.debug( + f"{DaCeProgress.default_prefix(config)} Pooled {memory_pooled} mb", ) # Set of debug tools inserted in the SDFG when dace.conf "syncdebug" @@ -195,12 +194,10 @@ def _build_sdfg( # Printing analysis of the compiled SDFG with DaCeProgress(config, "Build finished. Running memory static analysis"): - DaCeProgress.log( - DaCeProgress.default_prefix(config), - report_memory_static_analysis( - sdfg, memory_static_analysis(sdfg), False - ), + report = report_memory_static_analysis( + sdfg, memory_static_analysis(sdfg), False ) + pace_log.info(f"{DaCeProgress.default_prefix(config)} {report}") # Compilation done. # On Build: all ranks sync, then exit. @@ -211,17 +208,13 @@ def _build_sdfg( # a true multi-machine sync, outside of our own communicator class. if config.get_orchestrate() == DaCeOrchestration.Build: MPI.COMM_WORLD.Barrier() # Protect against early exist which kill SLURM jobs - DaCeProgress.log( - DaCeProgress.default_prefix(config), - "Build only, exiting.", - ) + pace_log.info(f"{DaCeProgress.default_prefix(config)} Build only, exiting.") exit(0) elif config.get_orchestrate() == DaCeOrchestration.BuildAndRun: if not is_compiling: - DaCeProgress.log( - DaCeProgress.default_prefix(config), - "Rank is not compiling. " - "Waiting for compilation to end on all other ranks...", + pace_log.info( + f"{DaCeProgress.default_prefix(config)} Rank is not compiling." + "Waiting for compilation to end on all other ranks..." ) MPI.COMM_WORLD.Barrier() diff --git a/dsl/pace/dsl/dace/utils.py b/dsl/pace/dsl/dace/utils.py index 40ac3c12..c10ad6ec 100644 --- a/dsl/pace/dsl/dace/utils.py +++ b/dsl/pace/dsl/dace/utils.py @@ -26,21 +26,17 @@ def __init__(self, config: DaceConfig, label: str): self.prefix = f"[{config.get_orchestrate()}]" self.label = label - @classmethod - def log(cls, prefix: str, message: str): - pace_log.debug(f"{prefix} {message}") - @classmethod def default_prefix(cls, config: DaceConfig) -> str: return f"[{config.get_orchestrate()}]" def __enter__(self): - DaCeProgress.log(self.prefix, f"{self.label}...") + pace_log.debug(self.prefix, f"{self.label}...") self.start = time.time() def __exit__(self, _type, _val, _traceback): elapsed = time.time() - self.start - DaCeProgress.log(self.prefix, f"{self.label}...{elapsed}s.") + pace_log.debug(self.prefix, f"{self.label}...{elapsed}s.") def _is_ref(sd: dace.sdfg.SDFG, aname: str): diff --git a/external/dace b/external/dace index 892d6147..b0cd25b9 160000 --- a/external/dace +++ b/external/dace @@ -1 +1 @@ -Subproject commit 892d61478165a9a5ccf226732dadb54b7b50f1f3 +Subproject commit b0cd25b9263a3c615ee2f3325167944628fbfde5 diff --git a/external/gt4py b/external/gt4py index 1717d3c2..d7cf10fb 160000 --- a/external/gt4py +++ b/external/gt4py @@ -1 +1 @@ -Subproject commit 1717d3c24dee33ff4f7ede7aacb7513283d40fce +Subproject commit d7cf10fb31de4e60b33c25a6807e07605d5ecde0 diff --git a/fv3core/tests/savepoint/translate/translate_a2b_ord4.py b/fv3core/tests/savepoint/translate/translate_a2b_ord4.py index be786a04..c0a81169 100644 --- a/fv3core/tests/savepoint/translate/translate_a2b_ord4.py +++ b/fv3core/tests/savepoint/translate/translate_a2b_ord4.py @@ -23,7 +23,7 @@ def __call__( vort, delpc, dt, - grid_type, + grid_type: int, ): # this function is kept because it has a translate test, if its # structure is changed significantly from __call__ of DivergenceDamping @@ -80,5 +80,6 @@ def compute_from_storage(self, inputs): nord_col, nord_col, ) + inputs["grid_type"] = 0 self.compute_obj(divdamp, **inputs) return inputs