Skip to content

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Aug 20, 2024
1 parent bdcd861 commit 4d779ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion aiida_hyperqueue/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ def validate_resources(cls, **kwargs):
except KeyError:
try:
# For backward compatibility where `num_machines` and `num_mpiprocs_per_machine` are setting
resources.num_cpus = kwargs.pop("num_machines", 1) * kwargs.pop(
# TODO: I only setting the default value as 1 for `num_mpiprocs_per_machine` because aiida-quantumespresso override
# resources default with `num_machines` set to 1 and then get builder with such setting.
# The `num_mpiprocs_per_machine` sometime can be read from "Default #procs/machine" of computer setup but if it is not exist
# the builder can not be properly get without passing `option` to builder generator.
# It is anyway a workaround for backward compatibility so this default is implemented despite it is quite specific for the qe plugin.
resources.num_cpus = kwargs.pop("num_machines") * kwargs.pop(
"num_mpiprocs_per_machine", 1
)
except KeyError:
Expand Down

0 comments on commit 4d779ee

Please sign in to comment.