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

print unused parameters #156

Open
ecoon opened this issue Sep 14, 2022 · 3 comments
Open

print unused parameters #156

ecoon opened this issue Sep 14, 2022 · 3 comments
Assignees

Comments

@ecoon
Copy link
Collaborator

ecoon commented Sep 14, 2022

At some point, it would be really nice to print out unused parameters. This would warn if there were unused options in the list (potential misspellings!)

Note that:

void Teuchos::ParameterList::unused(std::ostream& os ) const;

is a thing.

Note that it is likely more helpful to miss positives (the current behavior) than to have false positives.

@ecoon ecoon self-assigned this Sep 14, 2022
@ecoon
Copy link
Collaborator Author

ecoon commented Sep 14, 2022

I'm not sure this CAN be done globally on the main plist. The reason for this is because several sublists will never be "used," only "copied and used," e.g. for domain_set:*-{eval,PK} lists

@ecoon
Copy link
Collaborator Author

ecoon commented Sep 14, 2022

Maybe a utility, e.g.

finalizeParameterList(plist_local);

could be used that only wrote out LOCAL unused quantities, and WARNED of their existence?

@ecoon
Copy link
Collaborator Author

ecoon commented Sep 21, 2022

Note that this implies that all future work should try to avoid copy-constructing PLists, instead passing around RCP<PList>. In this way, the original "global" plist read from the file will get as many things marked as "used" as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant