Skip to content

Commit

Permalink
PwBaseWorkChain: Remove disabling of resource validation
Browse files Browse the repository at this point in the history
The `metadata.options.resources` port, exposed from `PwCalculation` was
set to not required, which disables its validation. This is problematic
when a parent workflow is launched with incorrect resources provided for
the `PwCalculation` subprocess. In this case the problem will only be
noticed when the `PwCalculation` gets actually launched, at which point
the parent process has already been created in the database, leaving it
excepted.

The disabling is a remnant from the time that the `PwBaseWorkChain`
provided an `automatic_parallelization` option, which would determine
the optimal resources for the `PwCalculation` automatically, but this
feature has long been removed. Therefore the resource validation can be
reenabled again.
  • Loading branch information
sphuber committed Sep 3, 2023
1 parent 5db3b28 commit d4e6681
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/aiida_quantumespresso/workflows/pw/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def define(cls, spec):
# yapf: disable
super().define(spec)
spec.expose_inputs(PwCalculation, namespace='pw', exclude=('kpoints',))
spec.input('pw.metadata.options.resources', valid_type=dict, required=False)
spec.input('kpoints', valid_type=orm.KpointsData, required=False,
help='An explicit k-points list or mesh. Either this or `kpoints_distance` has to be provided.')
spec.input('kpoints_distance', valid_type=orm.Float, required=False,
Expand Down

0 comments on commit d4e6681

Please sign in to comment.