mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-26 21:27:15 -05:00
#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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user