Skip to content

Commit b58c16e

Browse files
Update README.md
1 parent 5fae0b8 commit b58c16e

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

Diff for: ESMF_profiling/README.md

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ESMF Profiling tool
2-
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.
2+
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.
33

44
## Directory structure
55
```
@@ -13,6 +13,7 @@ The **ESMF Profiling tool** is a Python-based tool designed to read and process
1313
- handles the input ESMF profile files.
1414
- constructs the hierarchical data structure.
1515
- outputs runtimes for specific regions.
16+
- supports both exact and prefix matching for `regionNames` in runtime collection - an example is provided in this script.
1617
2. `esmfRegion.py`:
1718
- defines the ESMFRegion class.
1819
- represents individual ESMF regions, capturing performance metrics.
@@ -28,17 +29,27 @@ env:
2829
ESMF_RUNTIME_PROFILE: "ON"
2930
ESMF_RUNTIME_PROFILE_OUTPUT: "TEXT SUMMARY"
3031
```
32+
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).
33+
3134
After running the configuration, specify the path to the profiling logs, along with any specific regions of interest.
3235

3336
One example for demonstration:
3437
----------
3538
```python
3639
# Collect runtime info for specific regions
3740
ESMF_path = ['/path/to/your/ESMF/output/files']
38-
region_names = ['[ESMF]', '[ESMF]/[ensemble] RunPhase1/[ESM0001] RunPhase1/[OCN] RunPhase1']
41+
regionNames=[
42+
"[ESMF]",
43+
"[ESMF]/[ensemble] RunPhase1/[ESM0001] RunPhase1/[OCN] RunPhase1",
44+
"[ESMF]/[ensemble] RunPhase1/[ESM0001] RunPhase1/[MED]",
45+
]
3946
profile_prefix = 'ESMF_Profile.'
4047
esmf_summary = True # Set to True for summary profiling
4148
index = 2 # Choose the metric above to extract (e.g., mean time for summary profiling)
42-
runtime_totals = collect_runtime_tot(ESMF_path, regionNames=region_names, profile_prefix=profile_prefix, esmf_summary=esmf_summary, index=index)
49+
runtime_totals = collect_runtime_tot(ESMF_path,
50+
regionNames=region_names,
51+
profile_prefix=profile_prefix,
52+
esmf_summary=esmf_summary,
53+
index=index)
4354
print(runtime_totals)
4455
```

0 commit comments

Comments
 (0)