Skip to content

Commit

Permalink
Adds missing logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonb5 committed Oct 14, 2023
1 parent 192eb32 commit 3071dc3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions CIME/baselines/performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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")

Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit 3071dc3

Please sign in to comment.