#14596 Use #pragma omp parallel for when building corner point grids

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.
This commit is contained in:
Magne Sjaastad
2026-08-25 08:22:29 +02:00
parent d2862941f6
commit a7684a14d6
2 changed files with 2 additions and 2 deletions
@@ -216,7 +216,7 @@ bool RifRoffFileTools::openGridFile( const QString& fileName, RigEclipseCaseData
size_t numActiveCells = computeActiveCellMatrixIndex( activeCells );
// Loop over cells and fill them with data
#pragma omp for
#pragma omp parallel for
for ( int gridLocalCellIndex = 0; gridLocalCellIndex < cellCount; ++gridLocalCellIndex )
{
RigCell& cell = mainGrid->cell( cellStartIndex + gridLocalCellIndex );
@@ -287,7 +287,7 @@ void RimCornerPointCase::buildGrid( RigEclipseCaseData& eclipseCaseData,
size_t numActiveCells = RifRoffFileTools::computeActiveCellMatrixIndex( activeCells );
// Loop over cells and fill them with data
#pragma omp for
#pragma omp parallel for
for ( int gridLocalCellIndex = 0; gridLocalCellIndex < cellCount; ++gridLocalCellIndex )
{
RigCell& cell = mainGrid->cell( cellStartIndex + gridLocalCellIndex );