- Use its own fluidstate and Evaluation class to avoid having to add an extra derivative to the main equations
- Sotre the scaling factor to avoid calling the parameter all the time
sumWellSurfaceRates() only returns rank-local rates, but
isAutoChokeGroupUnderperforming_() compared them directly against the
full group target. Add comm_.sum() to aggregate rates across all ranks
before the comparison.
Guard RateKind usage with #ifdef RESERVOIR_COUPLING_ENABLED in
GroupStateHelper declaration, call site, and implementation. In
serial builds, ReservoirCoupling.hpp is not included so RateKind
is not declared.
Add missing isSlaveGroup() stub to the non-MPI RescoupProxy,
matching the existing isMasterGroup() stub.
Wrap the updateGpMaintTargetForGroups() call in a try/catch using
OPM_PARALLEL_CATCH_CLAUSE so that the GPMAINT-unsupported error
is catched before any collective operation in case the throw
were ever to fire on only some ranks.
The three bool parameters (res_rates, is_injection, network) had only 5 valid
combinations out of 8 possible. The new ReservoirCoupling::RateKind enum
names these directly, preventing invalid states and improving readability.
When updateNetworkLeafNodeProductionRates() calls sumWellPhaseRates() with
network=true for a master group, the network parameter was previously ignored.
The slave always computed rates with network=false, so efficiency factors were
applied even when GEFAC/WEFAC item 3 is "NO".
This commit adds a new field `network_surface_rates` to SlaveGroupProductionData
that contains rates computed with network=true (where efficiency factors are 1.0
for groups/wells with GEFAC/WEFAC item 3 = "NO").
Changes:
- Add network_surface_rates field to SlaveGroupProductionData struct
- Update MPI traits to serialize the new field
- Add collectSlaveGroupNetworkSurfaceProductionRates_() on slave side
- Pass network parameter through getReservoirCouplingMasterGroupRate_()
- Add getMasterGroupNetworkProductionSurfaceRate() to retrieve network rates
Guard parallel HDF5 calls (H5Pset_fapl_mpio, H5Pset_dxpl_mpio) with
H5_HAVE_PARALLEL in addition to HAVE_MPI. The existing HAVE_MPI guard
is insufficient because MPI availability does not imply HDF5 was built
with parallel support. When only serial HDF5 is installed, these
functions are not declared (hidden behind #ifdef H5_HAVE_PARALLEL in
H5FDmpio.h), causing a compile error.
The CMake safety check in opm-simulators_prereqs_hook that should
disable HDF5 in this scenario runs before find_package(HDF5), so it
never fires on a fresh build.
- Add Logger::debug() method for debug-level logging
- Add formatDays() helper using unit::day for human-readable time display
- Change verbose MPI communication messages from info to debug level
so they only appear in .DBG file, not .PRT file or stdout
- Add info-level message showing sync step coordination:
"Choosing next sync time between master and N active slave process(es): X days"
When reservoir coupling simulation ends, the master previously crashed during
MPI_Finalize() with "ompi_dpm_dyn_finalize: error -12" because slaves
terminated before master could cleanly disconnect the intercommunicators
created by MPI_Comm_spawn().
The fix implements a synchronous terminate/continue protocol:
- Master sends terminate signal (0=continue, 1=terminate) at each iteration
- Slave does blocking receive at start of each iteration
- When master finishes, it sends terminate=1 and both sides call
MPI_Comm_disconnect() before MPI_Finalize()
we set it to be under BHP control. It is in line with the current
fallback to use BHP to assemble the well control equation and at the
same time, it makes the well control mode more clear.