From 5c325dcc0b682f20a9f63798d507030b5b0dc3e4 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 24 Aug 2026 14:26:53 +0200 Subject: [PATCH] #14596 Remove unnecessary critical section in RiaCurveMerger 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. --- ApplicationLibCode/Application/Tools/RiaCurveMerger.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ApplicationLibCode/Application/Tools/RiaCurveMerger.inl b/ApplicationLibCode/Application/Tools/RiaCurveMerger.inl index 4110a16e7e..5257d95b86 100644 --- a/ApplicationLibCode/Application/Tools/RiaCurveMerger.inl +++ b/ApplicationLibCode/Application/Tools/RiaCurveMerger.inl @@ -195,7 +195,7 @@ void RiaCurveMerger::computeInterpolatedValues( bool includeValuesFr if ( !RiaCurveDataTools::isValidValue( interpolValue, false ) ) { -#pragma omp critical + // Each iteration writes to its own element, so no synchronization is required accumulatedValidValues[valueIndex] = HUGE_VAL; }