Skip to content

Conversation

@hakonhagland
Copy link
Contributor

@hakonhagland hakonhagland commented Jan 16, 2026

Builds on #6740, which should be merged first.

Separate the well group target calculation into its own method to:

  1. Fix semantic mismatch - updateAndCommunicateGroupData() now only updates and communicates group data. The well group target calculation is a distinct operation that happens after MPI communication.

  2. Eliminate redundant computation in beginTimeStep() - Previously the second call to updateAndCommunicateGroupData() recomputed all group data just to get well group targets.

  3. Clarify that well group targets don't need MPI communication - each rank computes targets only for its owned wells using the already-communicated group data.

@hakonhagland hakonhagland added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Jan 16, 2026
@hakonhagland
Copy link
Contributor Author

jenkins build this please

@hakonhagland hakonhagland marked this pull request as draft January 16, 2026 05:12
@hakonhagland hakonhagland force-pushed the refact_ucgd2 branch 3 times, most recently from 477b9ec to ab7e8e9 Compare January 20, 2026 07:01
@hakonhagland
Copy link
Contributor Author

jenkins build this please

@hakonhagland
Copy link
Contributor Author

jenkins build this please

Add a bitmask-based modification tracking mechanism to GroupState that
allows communicate_rates() to selectively communicate only vectors that
have been modified since the last communication. This prevents double-
counting when communicate_rates() is called multiple times and reduces
redundant MPI communication.

Changes:
- Add Modification enum with flags for each rate vector type
- Add mark_modified() calls to all 8 update methods
- Update communicate_rates() to only include modified vectors
- Clear modification flags after successful communication
- Add early exit when no data needs communication
@hakonhagland
Copy link
Contributor Author

jenkins build this please

…roupData()

Separate the well group target calculation into its own method to:

1. Fix semantic mismatch - updateAndCommunicateGroupData() now only updates
   and communicates group data (VREP, REIN, rates). The well group target
   calculation is a distinct operation that happens after MPI communication.

2. Eliminate redundant computation in beginTimeStep() - Previously the second
   call to updateAndCommunicateGroupData() recomputed all group data just to
   get well group targets. Now it only calls updateWellGroupTargets().

3. Clarify that well group targets don't need MPI communication - each rank
   computes targets only for its owned wells using the already-communicated
   group data.
@hakonhagland
Copy link
Contributor Author

jenkins build this please

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.

1 participant