phenotypic.sdk_.slurm.estimate_concurrent_capacity#
- phenotypic.sdk_.slurm.estimate_concurrent_capacity(partition: str, cpus_per_task: int = 1, mem_gb_per_task: float = 4.0) int[source]#
Estimate max concurrent tasks from partition resources via sinfo.
Queries SLURM’s
sinfofor the given partition to determine total CPUs, memory, and node count, then estimates how many tasks can run concurrently given per-task resource requirements.- Parameters:
- Returns:
Estimated number of concurrent tasks. Falls back to 100 if sinfo is unavailable.
- Return type:
Examples
>>> capacity = estimate_concurrent_capacity("compute") >>> capacity >= 1 # Always at least 1 True