#14621 Sector model export: Preserve include-only wrapper files - #14625
Merged
Conversation
kriben
marked this pull request as draft
August 27, 2026 08:13
kriben
marked this pull request as ready for review
August 31, 2026 13:56
jonjenssen
approved these changes
Aug 31, 2026
kriben
force-pushed
the
14621-sector-export-preserve-include-wrappers
branch
from
August 31, 2026 18:23
cb7e178 to
a6bbc86
Compare
Include files containing only INCLUDE statements, such as a wrapper collecting many lift curve (.ecl/.vfp) files, were dropped during sector model export, and the includes for all leaf files were written directly into the exported .DATA file. Update the custom-opm-common submodule so FileDeck recreates include-only files in the output directory and preserves the include hierarchy at any nesting depth. Add a regression test exporting a deck with a nested include-only wrapper and reloading the result.
kriben
force-pushed
the
14621-sector-export-preserve-include-wrappers
branch
from
August 31, 2026 18:43
a6bbc86 to
f0d0af5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14621.
Include files containing only INCLUDE statements, such as a wrapper collecting many lift curve (.ecl/.vfp) files, were dropped during sector model export, and the includes for all leaf files were written directly into the exported .DATA file.
An include-only file contributes no keywords to the parsed deck, so it never becomes a
FileDeckblock. When dumping withOutputMode::COPY,include_blockskipped past such files while walking up the include tree, so the leaf INCLUDE statements landed in the main .DATA file and the hierarchy was flattened.Update the custom-opm-common submodule (CeetronSolutions/opm-common branch
14621-preserve-include-only-files) soFileDeckrecreates include-only files in the output directory, writes the child INCLUDE statements into them, and includes each wrapper from its own parent. This preserves the include hierarchy at any nesting depth. The dump loop also skips re-including a file whose output stream is already open, which previously produced an INCLUDE with an empty file name when a file was split into multiple blocks by a nested include.Verified with the reporting customer's model: the exported .DATA now contains a single INCLUDE of the wrapper file, the wrapper is recreated with all 59 child includes in their original order, and the exported model reparses cleanly. Added a regression test exporting a deck with a nested include-only wrapper and reloading the result.