Skip to content

Switch to Using RstState::Load() Without Runspec - #7360

Merged
bska merged 1 commit into
OPM:masterfrom
bska:no-runspec-rststate-load
Aug 26, 2026
Merged

Switch to Using RstState::Load() Without Runspec#7360
bska merged 1 commit into
OPM:masterfrom
bska:no-runspec-rststate-load

Conversation

@bska

@bska bska commented Aug 25, 2026

Copy link
Copy Markdown
Member

PR OPM/opm-common#5308 added an overload of RstState::load() that does not require a Runspec argument. While we do have such an object here the restart file loading mechanism should not depend on the dimensions set in the restarted run. Restarted runs may increase such dimensions, e.g., the number of actions or conditions per action, so it's better to not provide those values in any way.

We still pass the run's number of PVT tables as an argument to load(). This will be subject to future removal once load() supports this mode.

PR OPM/opm-common#5308 added an overload of RstState::load() that
does not require a "Runspec" argument.  While we do have such an
object here the restart file loading mechanism should not depend on
the dimensions set in the restarted run.  Restarted runs may
increase such dimensions, e.g., the number of actions or conditions
per action, so it's better to not provide those values in any way.

We still pass the run's number of PVT tables as an argument to
load().  This will be subject to future removal once load() supports
this mode.
@bska bska added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Aug 25, 2026
@bska

bska commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

jenkins build this please

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates restart-state loading in opm-simulators to use the newer Opm::RestartIO::RstState::load() overload that does not require a Runspec, reducing coupling between restart loading and restarted-run dimension settings.

Changes:

  • Switch RstState::load() call site to the overload that omits Runspec.
  • Pass only the number of PVT tables (from Runspec::tabdims()) plus the input grid pointer to preserve current behavior while avoiding broader Runspec dependency.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bska

bska commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

PR approved and build check is green. I'll merge into master.

@bska
bska merged commit 76e062e into OPM:master Aug 26, 2026
3 checks passed
@bska
bska deleted the no-runspec-rststate-load branch August 26, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants