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

Implement parallelization options as explicit inputs. #554

Merged
merged 2 commits into from
Nov 23, 2020

Commits on Nov 20, 2020

  1. Implement parallelization options as explicit inputs.

    Implements the parallelization options as a single `Dict`
    given in the `parallelization` input.
    
    If any parallelization option is specified twice (either
    both in `parallization` and in `settings['CMDLINE']`, or
    more than once in `settings['CMDLINE']`), an
    `InputValidationError` is raised.
    If the flag is given only in `settings['CMDLINE']`, an
    `AiidaDeprecationWarning` is issued.
    If any parallelization option is already specified in the
    `settings['CMDLINE']`, a `AiidaDeprecationWarning` is issued.
    
    The `BasePwCpInputGenerator` is given three class attributes:
    - `_PARALLELIZATION_FLAGS` is a mapping `{flag_name: help}`
       of all possible flags.
    - `_ENABLED_PARALLELIZATION_FLAGS` is a tuple of flag names that
      are implemented in a particular code.
    - `_PARALLELIZATION_FLAG_ALIASES` is used to detect all possible
      variations on a flag name. These are taken from the QE source.
    
    When checking for existing parallelization flags in the manually
    passed cmdline parameters, these are normalized by splitting on
    whitespace.
    QE ignores flags that are capitalized differently, so we do not
    have to normalize capitalization here.
    
    Currently, `_ENABLED_PARALLELIZATION_FLAGS` is set only for PW
    calculations. Technically it accepts the `-nimage` flag, but we
    disallow it because (AFAIK) it doesn't make any sense - it just
    repeats the same calculation.
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    Dominik Gresch and sphuber committed Nov 20, 2020
    Configuration menu
    Copy the full SHA
    a856b54 View commit details
    Browse the repository at this point in the history
  2. Add __init__.py to 'aiida_quantumespresso/common'

    Without the `__init__.py`, `pylint` thinks that `types.py` is a
    stand-alone module, which would shadow the `types` standard
    library module.
    Dominik Gresch committed Nov 20, 2020
    Configuration menu
    Copy the full SHA
    23157ba View commit details
    Browse the repository at this point in the history