Skip to content

parallelization vs settings['CMDLINE'] input #1241

@mbercx

Description

@mbercx

In 4fabecc a parallelization input was added to the BasePwCpInputGenerator as an alternative to specifying parallelization flags (e.g. -npool, -ntg) via settings['CMDLINE']. The latter currently emits an AiidaDeprecationWarning for pw.x and cp.x.

While working on v5.0.0 I considered removing this deprecated path, but held off because:

  1. Warning is not seen at submission. The warning is raised inside prepare_for_submission, which is run by the daemon. Users typically never see it when submitting calculations, since it's only present in daemon logs. We should move the deprecation warning to a proper validator before actually removing the possibility of using the CMDLINE.

  2. parallelization is only available on pw.x and cp.x. Users of ph.x, pp.x, neb.x, and all NamelistsCalculation-based codes still have to use settings['CMDLINE'] for parallelization. If we want to go for the parallellization input, we should offer it consistently for all CalcJob classes. Also see: extend parallelization concept to PhCalculation #743

We should consider if we want to add parallelization to all CalcJob classes, or remove it entirely in favor of just using a CMDLINE setting. Some benefits for each:

parallelization

  • It's easier to find, also clearer in the provenance.
  • Straightforward, isolated validation.

CMDLINE

  • It's what user know: adding extra command line arguments is simple.
  • Manipulating the submission script in AiiDA is typically done via the options. So if we move this flag there (maybe even in AiiDA core), the usage would be more uniform.
  • Less code to maintain, especially if we want to add parallelization as an input to all CalcJobs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions