Move the call to cellCornerVertices below the K filter early out, so the corner coordinates are only computed for the cells that are actually tested against the polygon.
All unnamed critical regions map to the same implicit name, so a single process wide lock was shared by summary import, geometry generation, grid bounding box computation and NNC merging. Unrelated parallel loops therefore serialized against each other.
Give each region a critical_section_ name describing what it protects. The two regions guarding RifOpmCommonEclipseSummary::sm_createdEsmryFileCount deliberately share one name, as they protect the same counter.
Describe the OpenMP 2.0 constraints that follow from building with MSVC /openmp, and why an orphaned work sharing construct can deadlock the application when the master thread is also the Qt GUI thread.
Also document the pattern of collecting results in per thread buffers and merging after the parallel region, the convention of naming critical sections, and the rule that exceptions must not escape a structured block.
All four cell filter loops guarded a push_back into a shared container with an unnamed critical section, taking a process wide lock for every cell matching the polygon. On large grids with a permissive polygon this can be slower than running single threaded, and it made the resulting cell order vary between runs.
Collect the cells in per thread buffers and append them in thread order after the parallel region, following the pattern used elsewhere in the code base. This removes eight critical sections.
Each iteration writes to its own element of accumulatedValidValues, which is sized before the loop, so no synchronization is required. The write to curveValues a few lines below uses the same pattern without a critical section.
All unnamed critical regions share a single process wide lock, so this also removes contention against unrelated parallel loops.
The loop was declared with an ordered clause, but the body contains no ordered region, so the clause only enabled the ordered scheduling machinery without providing any ordering. The intended deterministic vertex order was not achieved either, because the actual synchronization was a critical section, which does not preserve iteration order.
Collect vertices in per thread buffers and merge them in thread order after the parallel region, following the pattern already used in RivFaultGeometryGenerator. This removes a lock acquisition per triangle in the innermost polygon loop, and makes the generated geometry identical from run to run.
totalNumberOfConnections was declared, listed in the reduction clause and used to size otherConnections, but it was never incremented. The counting was lost when the loop body was moved into extractConnectionsForFace, so the call has always been reserve( size() + 0 ), which RigConnectionContainer::reserve turns into a no-op.
The reserve was also called by every thread on the shared container without synchronization. Removing it eliminates that data race. The explicit barrier is redundant as well, since the omp for construct has no nowait clause and therefore already synchronizes before the merge.
The loops were annotated with #pragma omp for, which is a work-sharing construct that does nothing outside an enclosing parallel region. Replace it with #pragma omp parallel for so the cell loops actually run in parallel.
The pragma had no enclosing parallel region, so it did not parallelize anything and only added confusion.
This code caused a deadlock on Windows for the following workflow:
1. import a grid model
2. Import a large summary ensemble with no ESMRY that triggers display of a progress dialog. Make sure the progress dialog is displayed on top of the 3D models -> deadlock
Only save the buildcache from the default branch. GitHub scopes cache writes to the current ref, so a cache saved from a feature branch or PR is invisible to every other branch while still counting against the 10 GB per-repository quota and evicting the shared caches on the default branch.
Disable unity build for all configurations. Unity blobs invalidate on any change to the sources they bundle, which defeats buildcache reuse and fills the cache with objects that are unlikely to be hit again.
ResInsight-tests linked into the build root and copied its full runtime DLL
set there as a POST_BUILD step, the same pattern that made
extract-projectfile-versions race against the generated_classes.py edge. The
set is a superset of the one that failed, covering Qt6Gui, Qt6Widgets and the
rest, and nothing orders it against the code generation edge either. It fires
rarely only because copy_if_different compares content, so windeployqt having
already placed identical DLLs makes it a no-op. On a cold build where the copy
wins that race it genuinely writes.
Give the target its own RUNTIME_OUTPUT_DIRECTORY, and point the companion
PreBuildFileCopyTest target at the same directory so the ODB, OpenVDS and HDF5
runtime files stay next to the executable. That target runs before the link
creates the directory, so create it first.
Update the three workflows that run the test executable by path.
extract-projectfile-versions linked into the shared build root and copied
Qt6Core.dll and Qt6Sql.dll next to its executable as a POST_BUILD step. The
generated_classes.py edge runs ResInsight.exe out of that same directory with
those DLLs loaded, and nothing orders the two edges relative to each other, so
Ninja was free to schedule them concurrently. Overwriting a mapped DLL is a
sharing violation on Windows, which failed the copy and took the build down.
Give the target its own RUNTIME_OUTPUT_DIRECTORY. It is a standalone developer
tool with no reason to share the application output directory, so moving it
removes the conflict instead of narrowing it. Also switch the copy to
copy_if_different, matching the equivalent step in the unit test target.
deleteCalculation() removes the calculation before rebuildCaseMetaData() is called, and updateDataDependingOnCalculations() returned early for an empty collection. The addresses created by the last calculation were then left behind in the readers until the next refresh or a reload of the project.
Perform one more update after the last calculation is deleted, and keep the early return for the case where no calculations have been present.
A delta ensemble creates summary addresses for all realizations of the source ensembles. When a calculation was created after this, only the realizations showing tree nodes had their addresses recreated. The other realizations had no calculated address, and RimDeltaSummaryCase::values() discarded the vector as being present in only one of the source ensembles. Only realization 0 was plotted until the project was reloaded.
Add RifSummaryReaderInterface::refreshCalculatedAddresses() to recreate the addresses of the calculated readers without touching the native readers, and call it for all cases in an ensemble when calculations are updated.
A case in a grid ensemble is displayed by views in the view collection of the grid ensemble, but RimEclipseCase::reservoirViews() only inspected the view collection of the case itself and the global view collection. No views were found for such a case, so the display model was never rebuilt after a grid calculation was evaluated. When loading a project file, the view was left with the display model created before the calculation was evaluated, showing no legend and no cell colors.
Statistics cases were filtered out of the case lists used by the grid calculator, both in the variable table and in the Select Result dialog. Statistics cases belonging to a grid ensemble were also missing from RimProject::allGridCases(), as only the source cases of the ensemble were collected. Statistics cases in a grid case group were already included.
A statistics case can be used as source only. A calculated result stored in a statistics case is interpreted as computed statistics, and would block recomputation of the statistics, so a statistics case is never assigned as destination case.
A statistics case with no computed statistics is not necessarily opened. Make sure source cases are opened before grid dimensions are validated and before result data is read.
Send one batched request per event batch instead of one request per event.
Application Insights v2/track accepts an array of envelopes, so a batch of up
to maxBatchSize (512) events was previously issued as 512 concurrent POSTs.
QNetworkAccessManager only opens a handful of connections per host, so the
queued requests were aborted by their own transfer timeout before reaching the
wire, reported as "HTTP 0: Operation canceled".
Honour the circuit breaker in processEvents(). It was only checked when
enqueuing, so the up to 10000 already queued events kept being posted at full
rate after the breaker opened. The crash and shutdown flush bypasses the
breaker so a crash report is still attempted.
Keep at most one request in flight. Failures are only observed when the reply
finishes, which for an unreachable endpoint takes the full transfer timeout,
and the 100 ms timer kept launching requests during that window.
Log the circuit breaker transition once instead of on every subsequent failure.
Only read the reply body when the device is open. An aborted reply has a closed
device, and reading from it emitted a QIODevice warning per request.
Call attemptReconnection() from the process timer. It was dead code, so once
the breaker opened it could only close if a reply happened to succeed.
Simulators for two-phase gas/water models may report only SWAT. In this case no SGAS result entry was created, so SGAS was missing from the result list and TERNARY fell back to computing SOIL = 1 - SWAT, presenting the gas saturation as oil saturation.
Add RigSgasResultCalculator that creates a placeholder SGAS entry when the model has gas and water but no oil phase, SWAT is present and SGAS is missing. SGAS is then computed as SGAS = 1 - SWAT. The computation is dispatched from findOrLoadKnownScalarResult() and findOrLoadKnownScalarResultForTimeStep() the same way as SOIL.
The equivalent logic in RigCaseCellResultsData::testAndComputeSgasForTimeStep() was only reachable from RigSoilResultCalculator, which never runs for models without an oil phase. This function is replaced by computeSgasForTimeStep() delegating to the new calculator, and the unreachable call in RigSoilResultCalculator is removed.
The 'g' number format interprets the precision as the number of significant digits, not as the number of decimals. Using the number of decimals directly caused tick labels to be rounded to too few digits, so 10.5 was displayed as 11 and the same label could appear twice. Add the number of integer digits to the precision when the automatic number format is used.
Select the first ensemble when no top level summary cases are available, and never use a realization of an ensemble as the default source. The default source is now resolved by RiuSummaryVectorSelectionUi::defaultSummarySource(), used both when the editor is opened without a selection and when the editor is populated from a plot without curves. Also guard against a null curve set when matching ensemble curve sets in the preview plot.
Sumo data is loaded so the application stays responsive while it waits.
Run Sumo transfers on a dedicated thread
Split RiaSumoConnector into transport and data delegates
Load Sumo summary vectors concurrently and without waiting
Show that Sumo data is being loaded
When the summary plot time axis is configured to show time from simulation start, the text produced by Show Plot Data and the ASCII export now reports the same values instead of date and time. The time column header becomes "Time [<unit>]", and each row reports the elapsed time relative to the first time step of the first curve, scaled to the display unit selected on the time axis. Plots using the date based time axis are unchanged.
Time in months and years is computed using calendar arithmetic instead of a fixed number of seconds per unit, so a time step exactly N calendar months or years after the simulation start reports exactly N. This makes resampled data report whole numbers also when a leap year is part of the interval. The calendar arithmetic is available as RiaQDateTimeTools::calendarYearsBetween() and calendarMonthsBetween(), and is used both when plotting the curves and when reporting the time column.