From bd5a276fa72e6d1f8e5c8e61fab48e6747fbde0f Mon Sep 17 00:00:00 2001 From: minghangli-uni Date: Thu, 31 Oct 2024 15:49:37 +1100 Subject: [PATCH] Update README.md --- ESMF_profiling/README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ESMF_profiling/README.md b/ESMF_profiling/README.md index b05b7cf..a8f6a9e 100644 --- a/ESMF_profiling/README.md +++ b/ESMF_profiling/README.md @@ -1,5 +1,5 @@ # ESMF Profiling tool -The **ESMF Profiling tool** is a Python-based tool designed to read and process performance profile data from ESMF profiling log files. It provides a structured way to extract hierachical timing and computational stats for various regions within ESMF log files, enabling detailed performance analysis. +The **ESMF Profiling tool** is a Python-based tool designed to read and process performance profile data from ESMF profiling log files for **ACCESS-OM3**. It provides a structured way to extract hierachical timing and computational stats for various regions within ESMF log files, enabling detailed performance analysis. ## Directory structure ``` @@ -13,6 +13,7 @@ The **ESMF Profiling tool** is a Python-based tool designed to read and process - handles the input ESMF profile files. - constructs the hierarchical data structure. - outputs runtimes for specific regions. + - supports both exact and prefix matching for `regionNames` in runtime collection - an example is provided in this script. 2. `esmfRegion.py`: - defines the ESMFRegion class. - represents individual ESMF regions, capturing performance metrics. @@ -28,6 +29,8 @@ env: ESMF_RUNTIME_PROFILE: "ON" ESMF_RUNTIME_PROFILE_OUTPUT: "TEXT SUMMARY" ``` +where `TEXT` collects profiling logs per PET, and `SUMMARY` collects profiling data in a single summary text file that aggregates timings over multiple PETs. Details can be found [here](https://earthsystemmodeling.org/docs/nightly/develop/ESMF_refdoc/node6.html#SECTION060140000000000000000). + After running the configuration, specify the path to the profiling logs, along with any specific regions of interest. One example for demonstration: @@ -35,10 +38,18 @@ One example for demonstration: ```python # Collect runtime info for specific regions ESMF_path = ['/path/to/your/ESMF/output/files'] -region_names = ['[ESMF]', '[ESMF]/[ensemble] RunPhase1/[ESM0001] RunPhase1/[OCN] RunPhase1'] +regionNames=[ + "[ESMF]", + "[ESMF]/[ensemble] RunPhase1/[ESM0001] RunPhase1/[OCN] RunPhase1", + "[ESMF]/[ensemble] RunPhase1/[ESM0001] RunPhase1/[MED]", +] profile_prefix = 'ESMF_Profile.' esmf_summary = True # Set to True for summary profiling index = 2 # Choose the metric above to extract (e.g., mean time for summary profiling) -runtime_totals = collect_runtime_tot(ESMF_path, regionNames=region_names, profile_prefix=profile_prefix, esmf_summary=esmf_summary, index=index) +runtime_totals = collect_runtime_tot(ESMF_path, + regionNames=region_names, + profile_prefix=profile_prefix, + esmf_summary=esmf_summary, + index=index) print(runtime_totals) ```