Skip to content

Handle numerical aquifers split across MPI ranks - #7647

Draft
GitPaean wants to merge 3 commits into
OPM:masterfrom
GitPaean:numerical-aquifers-across-ranks
Draft

GitPaean wants to merge 3 commits into
OPM:masterfrom
GitPaean:numerical-aquifers-across-ranks

Conversation

@GitPaean

@GitPaean GitPaean commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

A numerical aquifer whose cells are split across MPI ranks stops the run. A rank that owns aquifer cells but not the first one cannot locate the connecting cell and hits the assertion in AquiferNumerical::checkConnectsToReservoir(); OPM keeps assertions in release builds unless WITH_NDEBUG is set. With assertions disabled, the rank owning the first aquifer cell would also count flow to the next aquifer cell as reservoir influx when that cell is in its overlap.

AquiferNumerical now also maps the aquifer cells a process holds as overlap, so faces between aquifer cells are recognised on every rank, and only the process owning the first aquifer cell handles the reservoir connection. The compressedIndex documentation now says it covers overlap cells, which this relies on.

Serial runs, and parallel runs where each aquifer stays on one rank, are unaffected.

A second serial-versus-two-rank comparison of the existing aquifer-num/3D_1AQU_3CELLS uses the partition from OPM/opm-tests#1711, which puts the first aquifer cell on one rank and the other two on the other. On master the two-rank run stops at the assertion.

Map locally present overlap aquifer cells so an internal aquifer face is
not reported as reservoir influx. Assign the reservoir connection only
to the process owning the first aquifer cell, avoiding an assertion on
processes that own only later cells.
@GitPaean GitPaean added the manual:bugfix This PR is a bug fix and should be noted in the manual label Nov 3, 2026
@GitPaean
GitPaean force-pushed the numerical-aquifers-across-ranks branch from e786db9 to f920eb3 Compare November 3, 2026 16:54
Rerun 3D_1AQU_3CELLS with its aquifer cells on two ranks. Without the
split handling the run stops at an assertion.
@GitPaean

GitPaean commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

jenkins build this opm-tests=1711 please

This branch has not been deployed

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

Labels

manual:bugfix This PR is a bug fix and should be noted in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant