Skip to content

Report where time goes inside the well solves - #7352

Draft
hnil wants to merge 1 commit into
OPM:masterfrom
hnil:pr/well-solve-timings
Draft

Report where time goes inside the well solves#7352
hnil wants to merge 1 commit into
OPM:masterfrom
hnil:pr/well-solve-timings

Conversation

@hnil

@hnil hnil commented Aug 24, 2026

Copy link
Copy Markdown
Member

Splits the well half out of #7177, which bska reasonably worried was large enough that the instrumentation would overshadow the logic. 14 files, +615, against 37 files and +839 for the whole thing.

An RAII timing scope in WellInterfaceGeneric, collected in BlackoilWellModel, giving:

  • well solve time, split into assembly and linear solve
  • well potential solve time
  • control, gaslift, group-control, network-balance and facility time
  • well and well-potential iteration counts

Hidden behind --output-extra-convergence-info=performance, off by default. Every line is printed only when its timer is non-zero, so nothing new appears unless something fills it.

Why this half first. It is the part that has already earned its place. On norne/NORNE_ATW2013_1A_MSW it reports:

Well solves:      2.36 s
    Linear solve: 0.04 s
  Potential solves: 0.02 s
Overall Well Iterations:    7222
Well Potential Iterations:   123

That the well linear solve is 1.7% of well-solve time is what showed a reuse-the-preconditioner option in #7020 could not pay off, and what identified the right metric for #7051 - neither visible from the existing Well assembly line, which lumps assembly and linear solve together.

The preconditioner, tracer, temperature, property-update and output-write timers stay in #7177 and follow separately. That also defers the one thing Copilot flagged as a possible runtime regression there - the timing decorator on every preconditioner apply - which is not part of this PR.

Adds an RAII timing scope to WellInterfaceGeneric and collects it in
BlackoilWellModel: well solve time split into assembly and linear solve,
well potential solves, control/gaslift/group/network/facility time, and
well and well-potential iteration counts.

Hidden behind --output-extra-convergence-info=performance, off by default.
Timings that nothing fills are not printed, so the report only grows where
there is something to show.

This is the well half of the instrumentation; the preconditioner, tracer,
temperature, property-update and output-write timers follow separately.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hnil hnil added the manual:enhancement This is an enhancement/improvent that needs to be documented in the manual label Aug 24, 2026
@hnil hnil mentioned this pull request Aug 24, 2026
@bska

bska commented Aug 25, 2026

Copy link
Copy Markdown
Member

Is there more work coming here? I only ask because the PR is in a draft state and not marked "ready for review" yet.

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

Labels

manual:enhancement This is an enhancement/improvent that needs to be documented in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants