Skip to content

Conversation

@forsyth2
Copy link
Collaborator

@forsyth2 forsyth2 commented Apr 2, 2025

Add example run configuration to debug performance issues described at E3SM-Project/zppy#694 (comment).

@forsyth2 forsyth2 added the Testing Files in `tests` modified label Apr 2, 2025
@forsyth2 forsyth2 self-assigned this Apr 2, 2025
"""
Output, with extra lines removed:
Running main
2025-04-02 09:27:49,826 [INFO]: __main__.py(main:45) >> Update time series figures
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to remove the extra 2 log lines from the output. We should definitely prioritize #10 to make parsing logs easier.

@forsyth2
Copy link
Collaborator Author

forsyth2 commented Apr 2, 2025

09:27:49 Begin computing globalAnnual for TREFHT, FSH
09:28:35 Begin plotting TREFHT glb
09:28:36 Begin plotting FSH glb
09:28:38 Begin computing northern hemisphere average for TREFHT, FSH
09:29:13 Begin plotting TREFHT n
09:29:14 Begin plotting FSH n
09:29:16 Begin computing southern hemisphere average for TREFHT, FSH
09:29:50 Begin plotting TREFH s
09:29:51 Begin plotting FSH s
09:29:54 Create Viewers
09:29:54 Done

Summary table (seconds):

Action glb n s
Compute averages for both variables 47 35 34
Plot TREFHT 1 1 1
Plot FSH 2 2 3

@forsyth2
Copy link
Collaborator Author

forsyth2 commented Apr 2, 2025

@chengzhuzhang noted the following in E3SM-Project/zppy#694 (comment):

Roughly, 2 hours are use for computation and more than 4 and half hours are used in plotting line plots. I think we should be able to save time at least on plotting.

This seems to disagree with my time data from this extremely minimal example, where by far the greatest amount of time is spent on computing the averages.

If it is the plotting slowing things down, a couple ideas:

  • There is a tall call hierarchy of plotting functions. Maybe there's too much function call overhead? I can't imagine that actually being the issue though.
  • We're saving plots to both single image PNGs and to a combined PDF (even for the viewers, there's a PDF created of n pages, 1 for each plot). Maybe the PDF concatenation scales poorly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Testing Files in `tests` modified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants