Skip to content

Add Parallel Support for Region Variable Values - #7292

Merged
bska merged 1 commit into
OPM:masterfrom
bska:parallel-reg-var-values
Aug 17, 2026
Merged

Add Parallel Support for Region Variable Values#7292
bska merged 1 commit into
OPM:masterfrom
bska:parallel-reg-var-values

Conversation

@bska

@bska bska commented Aug 6, 2026

Copy link
Copy Markdown
Member

This PR introduces an MPI-aware version of class

Opm::data::RegionVariableValues

(upstream PR OPM/opm-common#5277). The primary extension to the base class is that this version implements a non-trivial communicateIncrement() member function that incorporates cross-rank value contributions to all variables for all regions in all region sets. The same features and restrictions that apply to the base class also apply to this derived type.

@bska bska added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Aug 6, 2026
@bska

bska commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

I'm creating this PR in draft mode for two reasons:

  1. It depends on, and contains, the earlier PR Add Parallel Support for Region Variable Descriptors #7291.
  2. It depends on the new data::RegionVariableValues class introduced in the upstream PR Add Manager Class for Set of Region Variable Values opm-common#5277.

I will keep the PR in a draft state until such time as it is ready for review and merging.

@bska
bska force-pushed the parallel-reg-var-values branch 16 times, most recently from 7cc583e to 53336db Compare August 13, 2026 17:00
@bska
bska requested a lite review from Copilot August 14, 2026 09:17
@bska

bska commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

jenkins build this serial 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

Adds an MPI-aware implementation of Opm::data::RegionVariableValues to correctly aggregate per-region “increment” contributions across ranks, and wires in a new parallel unit test target to validate the behavior.

Changes:

  • Introduce Opm::ParallelRegionVariableValues (derived from data::RegionVariableValues) with an MPI sum() implementation of communicateIncrement().
  • Register the new source/header in the build system.
  • Add an MPI-driven unit test executable and run it with 2/3/4 ranks.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
parallelUnitTests.cmake Adds test_parallel_regionvariablevalues and configures MPI test runs for 2/3/4 processes.
opm/simulators/utils/ParallelRegionVariableValues.hpp Declares the new MPI-aware RegionVariableValues derived type.
opm/simulators/utils/ParallelRegionVariableValues.cpp Implements clone and MPI sum aggregation for increments.
CMakeLists_files.cmake Adds the new class source/header to the build lists.

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

Comment thread opm/simulators/utils/ParallelRegionVariableValues.hpp Outdated
@bska
bska requested a balanced review from Copilot August 14, 2026 13:44

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 4 out of 5 changed files in this pull request and generated no new comments.

@bska

bska commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

I have addressed Copilot's initial review and the PR build successfully in both the default (MPI) case and in a serial/sequential configuration. I'm marking this PR as "ready for review" now.

@bska
bska marked this pull request as ready for review August 14, 2026 13:51
@bska
bska force-pushed the parallel-reg-var-values branch from 9371c2b to 5cc81aa Compare August 14, 2026 14:56
@bska

bska commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

jenkins build this serial please

@akva2 akva2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good.

@akva2

akva2 commented Aug 17, 2026

Copy link
Copy Markdown
Member

jenkins build this serial please

This commit introduces an MPI-aware version of class

    Opm::data::RegionVariableValues

The primary extension to the base class is that this version
implements a non-trivial communicateIncrement() member function that
incorporates cross-rank value contributions to all variables for all
regions in all region sets.  The same features and restrictions that
apply to the base class also apply to this derived type.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@bska
bska force-pushed the parallel-reg-var-values branch from 5cc81aa to 042b32a Compare August 17, 2026 06:51
@akva2

akva2 commented Aug 17, 2026

Copy link
Copy Markdown
Member

jenkins build this serial please

@bska

bska commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

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

@bska
bska merged commit 75075e5 into OPM:master Aug 17, 2026
2 checks passed
@bska
bska deleted the parallel-reg-var-values branch August 17, 2026 07:51
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