-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add Unused Parameter Warnings #223
Add Unused Parameter Warnings #223
Conversation
Thanks!
|
It works, but it aborts after the sim runs through which first confused me. |
Thanks, please don't forget adding user-facing docs. |
I think this additional implementation of these options and maybe it justifies creating a function |
The nice thing about Please let me know when these items are ready (#223 (comment)) and this can be merged :) I moved them as to-do's in the PR description. |
Why not sort all? In WarpX it seems they are all grouped into a {
ParmParse pp_<context>("< context >");
pp_<context>.query("name-of-some-option")
}
this works already and user-facing docs have been added :)
|
73f4bf8
to
129312e
Compare
Minutes for what we discussed: We need no static member variables for states because we store our options directly in |
src/python/ImpactX.cpp
Outdated
@@ -181,6 +181,35 @@ void init_ImpactX(py::module& m) | |||
"The minimum number of digits (default: 6) used for the step\n" | |||
"number appended to the diagnostic file names." | |||
) | |||
.def("set_abort_on_warning_threshold", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests for this functionality as noted in the PR description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update: skipping Python tests for this PR as discussed this morning and doing them in a follow-up
Co-authored-by: Axel Huebl <[email protected]>
and add user-facing docs
- create initialization/Warnings.cpp - put early_param_check() and warning_logger_control() there
for more information, see https://pre-commit.ci
fe33d57
to
c157a8a
Compare
add docs for: - abort_on_warning_threshold - abort_on_unused_inputs - always_warn_immediately
Thanks for the suggestions! Co-authored-by: Axel Huebl <[email protected]>
Adds warnings about unused parameters like in WarpX as requested in #120
amrex.abort_on_unused_inputs = 1
works already as well?warpx.abort_on_warning_threshold
(or equivalent) in ImpactX..cpp
file[ ] add Python tests for unused inputs and for warning inskipped for follow-up since more testing is neededtests/python/test_impactx.py