mache.parallel.slurm.SlurmSystem.resolve_slurm_options

classmethod SlurmSystem.resolve_slurm_options(config: ConfigParser, nodes: int, min_nodes_allowed: int | None = None, partition: str | None = None, qos: str | None = None, constraint: str | None = None, desired_wall_time: str | None = None, scheduler_target: str | None = None) SlurmOptions[source]

Get Slurm submission options for a requested node count.

The partition is resolved first and the QOS is then resolved against the resulting node count. A requested partition or QOS is honored when the machine’s metadata allows it; otherwise the default is used and the returned options explain why.

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

  • nodes (int) – Requested node count.

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

  • partition (str, optional) – A specific partition the caller would like to use.

  • qos (str, optional) – A specific quality of service the caller would like to use.

  • constraint (str, optional) – A specific constraint the caller would like to use.

  • desired_wall_time (str, optional) – The wall time (HH:MM:SS) the caller intends to request. A requested target that does not allow it is not honored, and the returned wall_time is capped at max_wallclock.

  • scheduler_target (str, optional) – A target named without saying which axis it is on, for callers with one machine-independent intent such as “use the debug target”. It is used as the partition or the QOS, whichever this machine lists it under, checking partitions first. partition and qos take precedence on the axis they name.

Returns:

SlurmOptions – The resolved Slurm submission options.