From 3071dc359d03c7d24ba1d65581fd49f062eb4420 Mon Sep 17 00:00:00 2001 From: Jason Boutte Date: Fri, 13 Oct 2023 18:40:06 -0700 Subject: [PATCH] Adds missing logging --- CIME/baselines/performance.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CIME/baselines/performance.py b/CIME/baselines/performance.py index b2ede20dce5..f8f1fda77a1 100644 --- a/CIME/baselines/performance.py +++ b/CIME/baselines/performance.py @@ -136,8 +136,8 @@ def perf_write_baseline(case, basegen_dir, throughput=True, memory=True): if throughput: try: tput = perf_get_throughput(case, config) - except RuntimeError: - pass + except RuntimeError as e: + logger.debug("Could not get throughput: {0!s}".format(e)) else: baseline_file = os.path.join(basegen_dir, "cpl-tput.log") @@ -146,8 +146,8 @@ def perf_write_baseline(case, basegen_dir, throughput=True, memory=True): if memory: try: mem = perf_get_memory(case, config) - except RuntimeError: - pass + except RuntimeError as e: + logger.info("Could not get memory usage: {0!s}".format(e)) else: baseline_file = os.path.join(basegen_dir, "cpl-mem.log") @@ -286,6 +286,8 @@ def _perf_get_memory(case, cpllog=None): memlist = get_cpl_mem_usage(cpllog[0]) except (FileNotFoundError, IndexError): memlist = None + + logger.debug("Could not parse memory usage from coupler log") else: if len(memlist) <= 3: raise RuntimeError( @@ -318,6 +320,8 @@ def _perf_get_throughput(case): except (FileNotFoundError, IndexError): tput = None + logger.debug("Could not parse throughput from coupler log") + return tput