#14596 Name the remaining unnamed OpenMP critical sections

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.
This commit is contained in:
Magne Sjaastad committed 2026-08-25 08:22:29 +02:00
1 parent 63f73a2154
commit 4a6ebedade
8 files changed
+10 -10

No files matched your search

@@ -989,7 +989,7 @@ void RigMainGrid::buildCellSearchTree() const
threadIndicesForBoundingBoxes.shrink_to_fit();
threadBoundingBoxes.shrink_to_fit();
#pragma omp critical
#pragma omp critical( critical_section_RigMainGrid_buildCellSearchTree )
{
cellIndicesForBoundingBoxes.insert( cellIndicesForBoundingBoxes.end(),
threadIndicesForBoundingBoxes.begin(),