Skip to content

Add jobs best-partition - #98

Open
mmshad wants to merge 1 commit into
mainfrom
jobs-best-partition
Open

Add jobs best-partition#98
mmshad wants to merge 1 commit into
mainfrom
jobs-best-partition

Conversation

@mmshad

@mmshad mmshad commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Closes #97.

  • new command jobs best-partition: asks the controller when a job would start in each partition and sorts the answers
  • estimates come from sbatch --test-only, so nothing is submitted
  • takes a script positionally or with -f, or sbatch flags alone when there is no script yet
  • extra sbatch flags apply to every partition tested, so one script can be priced at several time limits or GPU counts
  • partitions the caller's groups and account cannot use are dropped before any query
  • a partition that refuses the job shows the reason Slurm gave for it
  • -p narrows the search, -A picks the account, -l caps how many partitions are asked
  • ends with a ready sbatch command for the winner
  • docs in docs/commands/jobs.md, the README table and the command index

Asks the controller when a job would start in each partition the caller
may use, from sbatch --test-only, and sorts the answers. A partition that
refuses the job reports why, which is often the useful part. The script
is named the way sbatch takes it, positionally or with -f.

The eligibility scan reads groups and account rules from scontrol, so
only plausible partitions cost a query. The asking is serial: the
controller runs each estimate behind its scheduler locks, so concurrent
requests take longer and start timing out.
@mmshad mmshad self-assigned this Aug 7, 2026
@mmshad
mmshad requested review from Naeemkh and dmbala August 7, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find the partition a job would start in soonest

1 participant