Skip to content

Commit

Permalink
Implement parallelization options as explicit inputs.
Browse files Browse the repository at this point in the history
If any parallelization option is already specified in the
`settings['CMDLINE']`, a `DeprecationWarning` is issued. However,
the value from `settings['CMDLINE']` still takes precedence. This
allows us to implement the defaults at the level of the input
port, without having to care about it later on.

The `BasePwCpInputGenerator` is given three class attributes:
- `_ALLOWED_PARALLELIZATION_FLAGS` is a list of tuples
  (flag_name, default, help), of all possible flags
- `_ENABLED_PARALLELIZATION_FLAGS` is a list of flag names that
  are implemented in a particular code.
- `_PARALLELIZATION_FLAG_ALIASES` is used to detect all possible
  variations on a flag name.

TODO:
- Testing & documentation
- Check if flag names are case sensitive. If not, this needs to
  be taken into account when checking for existing flags.
- Set `_ENABLED_PARALLELIZATION_FLAGS` for codes other than pw.x.
  • Loading branch information
Dominik Gresch committed Sep 18, 2020
1 parent 031b92b commit 122374f
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 54 deletions.
Loading

0 comments on commit 122374f

Please sign in to comment.