Skip to content

Delay WallTimeInfo until cbs are compiled - #4591

Open
imreddyTeja wants to merge 1 commit into
mainfrom
tr/sypd-rep
Open

Delay WallTimeInfo until cbs are compiled#4591
imreddyTeja wants to merge 1 commit into
mainfrom
tr/sypd-rep

Conversation

@imreddyTeja

@imreddyTeja imreddyTeja commented Jun 16, 2026

Copy link
Copy Markdown
Member

Delay estimating sypd until either a quarter of the tspan is finished, or all non-post-simulation callbacks are called at least once.

We don't need to merge this if people prefer the old behavior.
I excluded the nan check callback because the default period is 1024 steps.

Purpose

To-do

Content


  • I have read and checked the items on the review checklist.

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

📖 Docs preview for this PR: https://clima.github.io/ClimaAtmos.jl/previews/PR4591/

@imreddyTeja
imreddyTeja force-pushed the tr/sypd-rep branch 3 times, most recently from 1ff8c5c to d5c14d3 Compare June 16, 2026 20:47
@imreddyTeja
imreddyTeja marked this pull request as ready for review June 16, 2026 21:49
mod order

cap delay

change kwarg

improve comments
callbacks = (callbacks..., progress_logging_callback(dt, t_start, t_end)...)
# avoid estimating SYPD until the above (non-cleanup cbs) callbacks are compiled.
# raw SYPD between each call is still reported
steps_per_cycle = n_steps_per_cycle(callbacks, dt)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure that this changes progress logging in the intended way. I think steps_per_cycle will always equal 1 since the function n_steps_per_cycle only sees the conservation callback, resulting in sypd_estimate_step_delay = 10. To fix I think we need to call n_steps_per_cycle on the full list of callbacks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants