During the systematic review of all runtime/scheduler options in #7272, several naming inconsistencies were identified across the Computer, Code, and CalcJob layers. These have grown organically over time and should be cleaned up for a consistent API.
| What |
Mismatch |
Notes |
withmpi / with_mpi |
CalcJob input spec and CodeInfo field use withmpi; Code property uses with_mpi |
Most impactful — user-facing input name |
mpiprocs_per_machine / default_mpiprocs_per_machine |
Builder/CLI key drops the default_ prefix that the Computer API uses (get_default_mpiprocs_per_machine()) |
Silent mismatch, no deprecation note |
input_plugin / default_calc_job_plugin |
DB attribute stored as input_plugin, public property is default_calc_job_plugin |
Has TODO at abstract.py:37 for v3.0 |
workdir / work_dir |
Computer API is get_workdir(), Builder/CLI key is work_dir |
Minor |
withmpi → with_mpi specifically
This is the most user-facing inconsistency. Affected layers:
| Layer |
Current |
Target |
AbstractCode property |
with_mpi |
with_mpi (already correct) |
| CalcJob input spec |
metadata.options.withmpi |
metadata.options.with_mpi |
| CalcJob node attribute |
withmpi |
with_mpi |
CodeInfo field |
withmpi |
with_mpi |
Suggested migration pattern (applies to all of the above)
- >v2.8: Add the new name alongside the old. Internally use the new name; emit
AiidaDeprecationWarning when the old name is used. If both are set and disagree, raise ValueError. Non-breaking — existing code keeps working.
- v3.0: Remove the old aliases.
- Database migration: optional per case — can read both names at runtime during the deprecation period, then migrate or drop in v3.0.
During the systematic review of all runtime/scheduler options in #7272, several naming inconsistencies were identified across the Computer, Code, and CalcJob layers. These have grown organically over time and should be cleaned up for a consistent API.
withmpi/with_mpiCodeInfofield usewithmpi; Code property useswith_mpimpiprocs_per_machine/default_mpiprocs_per_machinedefault_prefix that the Computer API uses (get_default_mpiprocs_per_machine())input_plugin/default_calc_job_plugininput_plugin, public property isdefault_calc_job_pluginabstract.py:37for v3.0workdir/work_dirget_workdir(), Builder/CLI key iswork_dirwithmpi→with_mpispecificallyThis is the most user-facing inconsistency. Affected layers:
AbstractCodepropertywith_mpiwith_mpi(already correct)metadata.options.withmpimetadata.options.with_mpiwithmpiwith_mpiCodeInfofieldwithmpiwith_mpiSuggested migration pattern (applies to all of the above)
AiidaDeprecationWarningwhen the old name is used. If both are set and disagree, raiseValueError. Non-breaking — existing code keeps working.