mache.parallel.system.ParallelSystem.resolve_submission

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

Resolve a scheduler target and effective node count.

Policy:

  • 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.

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.

Returns:

SubmissionResolution – The selected target and adjusted node count.