Update terminal output and add limiting factor to adaptive output - #1757
Update terminal output and add limiting factor to adaptive output#1757wilfonba wants to merge 19 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR refines simulation runtime terminal output formatting and adds visibility into which CFL criterion (inviscid/viscous/capillary) is limiting the adaptive time step.
Changes:
- Track per-criterion CFL candidate time steps and select the global limiting criterion.
- Add an MPI helper to allreduce elementwise minima for small real vectors.
- Update printed progress lines to be shorter and (for adaptive CFL) include the limiting criterion tag.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/simulation/m_time_steppers.fpp | Computes per-criterion dt candidates, reduces globally, and records which criterion limits dt. |
| src/simulation/m_start_up.fpp | Updates progress/ETA print formatting and appends limiter tag for adaptive dt runs. |
| src/simulation/m_sim_helpers.fpp | Exposes dt_limiter state and expands CFL helper to return 3 candidate dts. |
| src/common/m_mpi_common.fpp | Adds s_mpi_allreduce_min_vec for elementwise global minima of real vectors. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@sbryngelson I believe a benchmark run will cover any performance regressions from this change. I can't approve my own PR, so you'll need to approve it to trigger the benchmarking. |
|
drafting until pr settles |
|
@sbryngelson what is remeaing that needs to settle? |
|
12 PRs, many of which with fickle CI results of unknown origin, and questionable CI integrity at best. I'm glad to have you work on that! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1757 +/- ##
==========================================
- Coverage 62.81% 62.80% -0.02%
==========================================
Files 84 84
Lines 21975 22008 +33
Branches 3224 3228 +4
==========================================
+ Hits 13804 13822 +18
- Misses 5949 5963 +14
- Partials 2222 2223 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@sbryngelson This PR can be marked as ready for review whenever it's appropriate. I'm not sure what else has higher priority at the moment. |
|
Merged master to resolve the conflicts from #1762: |
Conflict in m_collisions.fpp: master (MFlowCode#1745) deleted the loop comment; this branch added a max_overlap max-reduction to the same GPU_PARALLEL_LOOP. Kept the reduction, kept master's comment deletion. Claude-Session: https://claude.ai/code/session_01G77jhrA4JPDz5TqJzt8ACC
|
@sbryngelson is this good to mark as ready for review now? |
|
didn't we discuss concern about how this would change runtime cost (if at all)? since then, have you run a few tests? |
Conflict in m_time_steppers.fpp: master reduced the adaptive-dt loop to a single dt_local, this branch splits it into per-criterion icfl/vcfl/ccfl/coll locals. Kept this branch's split, and added alpha_rho to the loop's private clause - the merged body now passes it to s_compute_cell_state, and a shared copy would race under OpenMP offload.
|
@sbryngelson The benchmark runners run with AMD, CCE, and NVHPC, correct? Why would manual verification be necessary then? |
Lines of Code
|
This PR improves the runtime terminal output for simulations. The terminal output width is reduced. The following shows a before and after for a constant delta t simulation
The output for a
cfl_const_dtis identical since the delta t is constant. The following shows the before and after for acfl_adap_dtsimulationContribution Policy
We do not accept pull requests generated primarily by AI without genuine understanding or real-world usage context.
All contributions are expected to demonstrate:
If these expectations are not met, we would prefer to implement the changes ourselves rather than spend time reviewing low-effort submissions.
Acknowledgement
PR template credit: junegunn