Skip to content

#14621 Sector model export: Preserve include-only wrapper files - #14625

Merged
kriben merged 1 commit into
devfrom
14621-sector-export-preserve-include-wrappers
Aug 31, 2026
Merged

#14621 Sector model export: Preserve include-only wrapper files#14625
kriben merged 1 commit into
devfrom
14621-sector-export-preserve-include-wrappers

Conversation

@kriben

@kriben kriben commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

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 FileDeck block. When dumping with OutputMode::COPY, include_block skipped 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) so FileDeck recreates 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.

@kriben
kriben marked this pull request as draft August 27, 2026 08:13
@kriben kriben self-assigned this Aug 27, 2026
@kriben
kriben requested a review from jonjenssen August 31, 2026 11:41
@kriben
kriben marked this pull request as ready for review August 31, 2026 13:56
@kriben
kriben force-pushed the 14621-sector-export-preserve-include-wrappers branch from cb7e178 to a6bbc86 Compare August 31, 2026 18:23
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
kriben force-pushed the 14621-sector-export-preserve-include-wrappers branch from a6bbc86 to f0d0af5 Compare August 31, 2026 18:43
@kriben
kriben merged commit 14a4aa0 into dev Aug 31, 2026
19 checks passed
@kriben
kriben deleted the 14621-sector-export-preserve-include-wrappers branch August 31, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sector model export: Preserve include-only wrapper files for lift curves

2 participants