Skip to content

Commit 17e173f

Browse files
committed
PwCalculation: Fix calling input validation of base class
The `PwCalculation` overrides the top-level input namespace validator with the `validate_inputs` classmethod. It properly calls the super to call the validation of the `CalcJob` base class, however, that class doesn't use that class method for the validation, but rather uses the `validate_calc_job` function.
1 parent d4e6681 commit 17e173f

File tree

6 files changed

+17
-0
lines changed

6 files changed

+17
-0
lines changed

src/aiida_quantumespresso/calculations/pw.py

+7
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,15 @@ def validate_inputs(cls, value, port_namespace):
179179
the ``parent_folder`` input at a later step in the outline. To avoid raising any warnings, such a work chain
180180
must exclude the ``parent_folder`` port when exposing the inputs of the ``PwCalculation``.
181181
"""
182+
from aiida.engine.processes.calcjobs.calcjob import validate_calc_job
183+
182184
result = super().validate_inputs(value, port_namespace)
183185

186+
if result is not None:
187+
return result
188+
189+
result = validate_calc_job(value, port_namespace)
190+
184191
if result is not None:
185192
return result
186193

tests/workflows/protocols/pw/test_bands/test_default.yml

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ bands:
66
max_wallclock_seconds: 43200
77
resources:
88
num_machines: 1
9+
num_mpiprocs_per_machine: 1
910
withmpi: true
1011
parameters:
1112
CONTROL:
@@ -45,6 +46,7 @@ relax:
4546
max_wallclock_seconds: 43200
4647
resources:
4748
num_machines: 1
49+
num_mpiprocs_per_machine: 1
4850
withmpi: true
4951
parameters:
5052
CELL:
@@ -82,6 +84,7 @@ scf:
8284
max_wallclock_seconds: 43200
8385
resources:
8486
num_machines: 1
87+
num_mpiprocs_per_machine: 1
8588
withmpi: true
8689
parameters:
8790
CONTROL:

tests/workflows/protocols/pw/test_relax/test_default.yml

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ base:
88
max_wallclock_seconds: 43200
99
resources:
1010
num_machines: 1
11+
num_mpiprocs_per_machine: 1
1112
withmpi: true
1213
parameters:
1314
CELL:
@@ -42,6 +43,7 @@ base_final_scf:
4243
max_wallclock_seconds: 43200
4344
resources:
4445
num_machines: 1
46+
num_mpiprocs_per_machine: 1
4547
withmpi: true
4648
parameters:
4749
CONTROL:

tests/workflows/protocols/test_pdos/test_default.yml

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ nscf:
2020
max_wallclock_seconds: 43200
2121
resources:
2222
num_machines: 1
23+
num_mpiprocs_per_machine: 1
2324
withmpi: true
2425
parameters:
2526
CONTROL:
@@ -61,6 +62,7 @@ scf:
6162
max_wallclock_seconds: 43200
6263
resources:
6364
num_machines: 1
65+
num_mpiprocs_per_machine: 1
6466
withmpi: true
6567
parameters:
6668
CONTROL:

tests/workflows/protocols/xspectra/test_core/test_default.yml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ scf:
2626
max_wallclock_seconds: 43200
2727
resources:
2828
num_machines: 1
29+
num_mpiprocs_per_machine: 1
2930
withmpi: true
3031
parameters:
3132
CONTROL:

tests/workflows/protocols/xspectra/test_crystal/test_default.yml

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ core:
1414
max_wallclock_seconds: 43200
1515
resources:
1616
num_machines: 1
17+
num_mpiprocs_per_machine: 1
1718
withmpi: true
1819
parameters:
1920
CONTROL:
@@ -85,6 +86,7 @@ relax:
8586
max_wallclock_seconds: 43200
8687
resources:
8788
num_machines: 1
89+
num_mpiprocs_per_machine: 1
8890
withmpi: true
8991
parameters:
9092
CELL:

0 commit comments

Comments
 (0)