Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow in memory manipulation of nalu yaml files #51

Merged
merged 8 commits into from
Jul 25, 2023
Merged

Conversation

psakievich
Copy link
Contributor

@psakievich psakievich commented Jul 23, 2023

Allow users to overwrite entries in a single template nalu-wind yaml file for each yaml instance.
This PR allows you to specify parameters to change in all nalu-wind instance and each one individually. See the added test file for examples.

This PR only allows you to replace existing leaf nodes in the yaml graph so you can over write values, but you can not add totally new nodes to the graph i.e. add in a mesh motion if it doesn't exist in the template file.

It will change the naming convention for the log files to be [input_file]_[index].log when this is employed rather than [input_file].log.

I have unit-tests for this in a stand alone project. When we hook up googletest I can copy them over to the driver repo.

@ashesh2512
Copy link
Contributor

@psakievich Do we have the option to write the various nalu files for debugging purposes? Did I miss that somewhere in the PR?

@psakievich
Copy link
Contributor Author

Yes it is in the regression test.

@psakievich
Copy link
Contributor Author

@ashesh2512 I currently have it as write_final_yaml_to_disk: true and then it will take the logfile name for that instance and swap the suffix to be .yaml instead of .log. That way they are paired together.

But the more I think about it the more I want to make nalu just natively dump the input file into the logfile. Then you can see exactly what options were used for the run AND run the reproducer all by just having someone send you the log file.

app/exawind/exawind.cpp Outdated Show resolved Hide resolved
app/exawind/exawind.cpp Outdated Show resolved Hide resolved
src/yaml-editor.hpp Outdated Show resolved Hide resolved
src/yaml-editor.hpp Outdated Show resolved Hide resolved
@psakievich psakievich marked this pull request as ready for review July 24, 2023 21:19
@psakievich psakievich merged commit 20610d1 into main Jul 25, 2023
2 checks passed
@psakievich psakievich deleted the f/yaml-replacer branch July 25, 2023 16:18
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.

3 participants