diff --git a/ApplicationLibCode/ReservoirDataModel/RigCellFaceGeometryTools.cpp b/ApplicationLibCode/ReservoirDataModel/RigCellFaceGeometryTools.cpp index ab8a0a1a6b..a4ef1b35b1 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigCellFaceGeometryTools.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigCellFaceGeometryTools.cpp @@ -177,18 +177,15 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain if ( atLeastOneCellActive ) activeFaceIndices.push_back( faceIdx ); } - size_t totalNumberOfConnections = 0u; #pragma omp parallel { RigConnectionContainer threadConnections; -#pragma omp for schedule( guided ) reduction( + : totalNumberOfConnections ) +#pragma omp for schedule( guided ) for ( int activeFaceIdx = 0; activeFaceIdx < static_cast( activeFaceIndices.size() ); activeFaceIdx++ ) { size_t faceIdx = activeFaceIndices[activeFaceIdx]; extractConnectionsForFace( faultFaces[faceIdx], mainGrid, nativeCellPairs, threadConnections ); } -#pragma omp barrier - otherConnections.reserve( otherConnections.size() + totalNumberOfConnections ); // Merge together connections per thread assignThreadConnections( otherConnections, threadConnections );