The OptionsManager ignores any options in the global Options database if it has not been given a prefix and had to generate one automatically:
|
# If no prefix is provided generate a default prefix |
|
# and ignore any command line options |
|
if options_prefix is None: |
|
default_prefix = default_prefix or "petsctools_" |
|
default_prefix = _validate_prefix(default_prefix) |
|
self.options_prefix = f"{default_prefix}{next(self.count)}_" |
|
self.parameters = parameters |
|
self.to_delete = set(parameters) |
That means if you try to pass something like -petsctools_0_ksp_monitor from the command line it will be silently ignored.
We should try to detect this case and raise a warning if someone tries to do this.
The
OptionsManagerignores any options in the globalOptionsdatabase if it has not been given a prefix and had to generate one automatically:petsctools/petsctools/options.py
Lines 422 to 429 in 228276b
That means if you try to pass something like
-petsctools_0_ksp_monitorfrom the command line it will be silently ignored.We should try to detect this case and raise a warning if someone tries to do this.