Merge pull request #5073 from OPM/progress-bar

Progress bar to summary reader
This commit is contained in:
Magne Sjaastad 2019-11-21 07:10:32 +01:00
parent 72a5c6cfef
commit a511f580e4

View File

@ -399,9 +399,11 @@ void RimSummaryCaseMainCollection::loadFileSummaryCaseData( std::vector<RimFileS
{
// Use openMP when reading file summary case meta data. Avoid using the virtual interface of base class
// RimSummaryCase, as it is difficult to make sure all variants of the leaf classes are thread safe.
// Only open the summary file reader in parallel loop to reduce risk of multithreading issues
// Only open the summary file reader in parallel loop to reduce risk of multi threading issues
#pragma omp parallel for
caf::ProgressInfo progInfo( fileSummaryCases.size(), "Loading Summary Cases" );
#pragma omp parallel for schedule( dynamic )
for ( int cIdx = 0; cIdx < static_cast<int>( fileSummaryCases.size() ); ++cIdx )
{
RimFileSummaryCase* fileSummaryCase = fileSummaryCases[cIdx];
@ -409,6 +411,8 @@ void RimSummaryCaseMainCollection::loadFileSummaryCaseData( std::vector<RimFileS
{
fileSummaryCase->createSummaryReaderInterface();
}
progInfo.setProgress( cIdx );
}
for ( int cIdx = 0; cIdx < static_cast<int>( fileSummaryCases.size() ); ++cIdx )