Skip to content

Add jobs best-partition - #98

Merged
mmshad merged 1 commit into
mainfrom
jobs-best-partition
Aug 20, 2026
Merged

Add jobs best-partition#98
mmshad merged 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

@dmbala dmbala left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to check a narrow sub-set like kempner* or from the comma separated list of partitions partionA, partitionB, partitionC?

@mmshad

mmshad commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

is it possible to check a narrow sub-set like kempner* or from the comma separated list of partitions partionA, partitionB, partitionC?

Yes, it's already there:

-p narrows the search, -A picks the account, -l caps how many partitions are asked

@mmshad
mmshad merged commit f0c4ec7 into main Aug 20, 2026
7 checks passed
@mmshad
mmshad deleted the jobs-best-partition branch August 20, 2026 17:46
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

2 participants