Skip to content

detecting when the first perforation values cannot be made consistent - #7369

Open
GitPaean wants to merge 1 commit into
OPM:masterfrom
GitPaean:fix_parallel_well_first_perf_guard
Open

detecting when the first perforation values cannot be made consistent#7369
GitPaean wants to merge 1 commit into
OPM:masterfrom
GitPaean:fix_parallel_well_first_perf_guard

Conversation

@GitPaean

Copy link
Copy Markdown
Member

broadcastFirstPerforationValue() does nothing when no process reported holding the first open connection of the well, and every process then keeps its own value. That is intended when the well has no open connections at all, but if the well is perforated it means the processes silently end up with different values for the pvt region, the reference density and the pressure, temperature and salt concentration of the first connection.

communicateFirstPerforation() now also gathers whether a process has any perforation, so the two cases can be told apart, and throws for the second.

@GitPaean GitPaean added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Aug 28, 2026
@GitPaean
GitPaean requested a lite review from Copilot August 28, 2026 10:55

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 tightens parallel well synchronization by detecting the invalid case where a well has (open) perforations but no rank reports owning the first open connection, which would otherwise allow ranks to silently diverge in “first perforation” derived properties (e.g., PVT region, reference density, first-connection P/T/salt).

Changes:

  • Extend ParallelWellInfo::communicateFirstPerforation() to allgather an additional per-rank flag and throw std::logic_error when perforations exist but no rank claims the first open connection.
  • Add a unit test asserting that this inconsistent “perforated well without first perforation owner” case is detected and rejected.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/test_parallelwellinfo.cpp Adds a new Boost test case covering the newly-detected inconsistent first-perforation ownership scenario.
opm/simulators/wells/ParallelWellInfo.cpp Updates first-perforation coordination to distinguish “no open connections anywhere” from “perforated but no first owner” and throw in the latter case.

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

Comment thread opm/simulators/wells/ParallelWellInfo.cpp Outdated
Comment thread tests/test_parallelwellinfo.cpp
@GitPaean
GitPaean force-pushed the fix_parallel_well_first_perf_guard branch from a8702dc to 86e17bf Compare August 28, 2026 11:14
@GitPaean
GitPaean requested a lite review from Copilot August 28, 2026 11:16

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread opm/simulators/wells/ParallelWellInfo.cpp
Comment thread opm/simulators/wells/ParallelWellInfo.cpp Outdated
@GitPaean
GitPaean force-pushed the fix_parallel_well_first_perf_guard branch from 86e17bf to 91dde76 Compare August 28, 2026 11:46
@GitPaean

Copy link
Copy Markdown
Member Author

jenkins build this please

broadcastFirstPerforationValue() does nothing when no process reported holding
the first open connection of the well, and every process then keeps its own
value. That is intended when the well has no open connections at all, but if
the well is perforated it means the processes silently end up with different
values for the pvt region, the reference density and the pressure, temperature
and salt concentration of the first connection.

communicateFirstPerforation() now also gathers whether a process has any
perforation, so the two cases can be told apart, and throws for the second.
@GitPaean
GitPaean force-pushed the fix_parallel_well_first_perf_guard branch from 91dde76 to 23684c4 Compare August 28, 2026 13:02
@GitPaean
GitPaean marked this pull request as ready for review August 28, 2026 13:16
@GitPaean

Copy link
Copy Markdown
Member Author

I do not think we have problem so far with this corner situation, but it is more for safety on the code side found when working with #7367

@GitPaean
GitPaean requested a review from akva2 August 28, 2026 13:18
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.

2 participants