#14309 Open summary case without UNSMRY data file as empty reader

A SMSPEC file without a UNSMRY data file is re-read on every request for a summary vector, since RifReaderEclipseSummary::open returns false and no reader is cached. For an ensemble with multiple realizations missing UNSMRY, this is a severe performance problem.

Guard RifReaderEclipseSummary::open so that when no ESMRY, h5 or resdata data file is present, it returns true and creates a valid but empty reader. Skip ESMRY conversion when no UNSMRY is present, and add RifEclipseSummaryTools::hasSummaryDataFiles to detect the missing data file.
This commit is contained in:
Magne Sjaastad committed 2026-06-24 15:35:07 +02:00
1 parent 1084684b3d
commit e3f7e3f1c7
5 files changed
+44 -2

No files matched your search

@@ -418,8 +418,9 @@ TEST( OpmSummaryTests, ReadSmspecWithoutUnsmryEmptyReader )
RifReaderEclipseSummary reader;
// No summary data file is present, so opening fails, but it must not crash or throw.
EXPECT_FALSE( reader.open( filePath, nullptr ) );
// No summary data file is present, but opening must succeed and create a valid, but empty, reader.
// This ensures the case is opened once and not re-read on every request.
EXPECT_TRUE( reader.open( filePath, nullptr ) );
reader.createAndSetAddresses();