neams-th-coe / cardinal

High-Fidelity Multiphysics
https://cardinal.cels.anl.gov/
Other
84 stars 39 forks source link

Convert to !include for cases with input file merging #859

Open lewisgross1296 opened 4 months ago

lewisgross1296 commented 4 months ago

Bug Description

Recently while working on a multiphysics simulation, using the merging inputs method (e.g. cardinal-opt -i common_input.i openmc.i, I ran into an issue where the sub-application could not access parameters defined in common_input.i. I tested as standalone: cardinal-opt -i common_input.i solid.i and that worked, so I was a bit puzzled.

After a conversation in the MOOSE slack, I was told to use WASP's !include common_input.i instead. While the merging inputs still worked for older tutorials, I'm not quite sure why it failed in my case. Though, changing to the WASP paradigm fixed my issue.

Steps to Reproduce

Using Cardinal at hash cb6120bbc7b73259b99fbc53de423ea284f5bc4f. I can attach a more minimal example if desired, but not sure this is necessary since I don't think the current tutorials will generate this error. It's more of a choice than a necessity.

Impact

Keeping Cardinal up to date with the latest MOOSE conventions.

I can issue a PR to add the !include in places where we merge inputs + update tutorials, but if you'd rather leave the tutorials as is, feel free to close this issue.

aprilnovak commented 4 months ago

Thanks @lewisgross1296! This is interesting, that our tutorials work but your case does not. It would be good to update Cardinal's tutorials anyways to use the newer syntax, since that's easier to have the !include instead of users needing to type extra on the command line.