CIME.baselines package

Submodules

CIME.baselines.performance module

CIME.baselines.performance.get_cpl_mem_usage(cpllog)[source]

Read memory usage from coupler log.

Parameters

cpllogstr

Path to the coupler log.

Returns

list

Memory usage (data, highwater) as recorded by the coupler or empty list.

CIME.baselines.performance.get_cpl_throughput(cpllog)[source]

Reads throuhgput from coupler log.

Parameters

cpllogstr

Path to the coupler log.

Returns

int or None

Throughput as recorded by the coupler or None

CIME.baselines.performance.get_latest_cpl_logs(case)[source]

find and return the latest cpl log file in the run directory

CIME.baselines.performance.load_coupler_customization(case)[source]

Loads customizations from the coupler cime_config directory.

Parameters

caseCIME.case.case.Case

Current case object.

Returns

CIME.config.Config

Runtime configuration.

CIME.baselines.performance.perf_compare_memory_baseline(case, baseline_dir=None)[source]

Compares model highwater memory usage.

Parameters

caseCIME.case.case.Case

Current case object.

baseline_dirstr

Overrides the baseline directory.

Returns

below_tolerancebool

Whether the comparison was below the tolerance.

commentstr

Provides explanation from comparison.

CIME.baselines.performance.perf_compare_throughput_baseline(case, baseline_dir=None)[source]

Compares model throughput.

Parameters

caseCIME.case.case.Case

Current case object.

baseline_dirstr

Overrides the baseline directory.

Returns

below_tolerancebool

Whether the comparison was below the tolerance.

commentstr

Provides explanation from comparison.

CIME.baselines.performance.perf_get_memory(case, config)[source]

Gets the model memory usage.

First attempts to use a coupler defined method to retrieve the models memory usage. If this is not defined then the default method of parsing the coupler log is used.

Parameters

caseCIME.case.case.Case

Current case object.

Returns

str or None

Model memory usage.

CIME.baselines.performance.perf_get_memory_list(case, cpllog)[source]
CIME.baselines.performance.perf_get_throughput(case, config)[source]

Gets the model throughput.

First attempts to use a coupler define method to retrieve the models throughput. If this is not defined then the default method of parsing the coupler log is used.

Parameters

caseCIME.case.case.Case

Current case object.

Returns

str or None

Model throughput.

CIME.baselines.performance.perf_write_baseline(case, basegen_dir, throughput=True, memory=True)[source]

Writes the baseline performance files.

Parameters

caseCIME.case.case.Case

Current case object.

basegen_dirstr

Path to baseline directory.

throughputbool

If true, write throughput baseline.

memorybool

If true, write memory baseline.

CIME.baselines.performance.read_baseline_file(baseline_file)[source]

Reads value from baseline_file.

Strips comments and returns the raw content to be decoded.

Parameters

baseline_filestr

Path to the baseline file.

Returns

str

Value stored in baseline file without comments.

CIME.baselines.performance.write_baseline_file(baseline_file, value, mode='a')[source]

Writes value to baseline_file.

Parameters

baseline_filestr

Path to the baseline file.

valuestr

Value to write.

modestr

Mode to open file with.

Module contents