mache.parallel.system.ParallelSystem.resolve_submission

classmethod ParallelSystem.resolve_submission(config: ConfigParser, nodes: int, target_type: str, min_nodes_allowed: int | None = None, requested: str | None = None, desired_wall_time: str | None = None) SubmissionResolution[source]

Resolve a scheduler target and effective node count.

Policy:

  • If requested is given and can be honored, use it.

  • Otherwise, prefer exact match when available.

  • Otherwise choose the nearest valid node count.

  • Tie-break toward lower (decrease) adjustments.

  • If a lower adjustment violates min_nodes_allowed, choose the nearest feasible higher adjustment.

A requested target is a preference, not an assertion: if it cannot be honored, the default target is resolved instead and the returned resolution has honored=False along with a reason.

Parameters:
  • config (ConfigParser) – Machine configuration parser.

  • nodes (int) – Requested node count.

  • target_type ({'queue', 'partition', 'qos'}) – Scheduler target type to resolve.

  • min_nodes_allowed (int, optional) – Optional lower bound for adjusted node counts.

  • requested (str, optional) – A specific target the caller would like to use. None, an empty string and placeholders such as <<<default>>> all mean “no target was requested”. A request is also ignored when the machine defines no targets of this type at all, since there is then no choice for the request to have been denied.

  • desired_wall_time (str, optional) – The wall time (HH:MM:SS) the caller intends to request. When given, a requested target whose max_wallclock is shorter is not honored.

Returns:

SubmissionResolution – The selected target and adjusted node count.