Problem
srun and salloc do not accept -w/--nodelist (or -x/--exclude). sbatch accepts both. This breaks a common Slurm workflow: pinning an interactive or parallel job to specific nodes.
$ spur srun -w node1 hostname
Error: error: unexpected argument '-w' found
$ spur sbatch --help
-w, --nodelist <NODELIST>
Root cause
This is a CLI wiring gap, not a scheduler limitation. SrunArgs and SallocArgs have no nodelist/exclude fields and never populate JobSpec.nodelist / JobSpec.exclude.
The backend already supports both end to end:
- Proto:
JobSpec.nodelist (proto/slurm.proto:113), JobSpec.exclude (:114)
sbatch already sets them (crates/spur-cli/src/sbatch.rs)
- The backfill scheduler honors
nodelist as an allow-list and exclude as a deny-list (crates/spur-sched/src/backfill.rs:76)
Expected behavior
srun -w <nodes> and salloc -w <nodes> restrict placement to the listed nodes.
srun -x <nodes> and salloc -x <nodes> exclude the listed nodes.
- CLI flags override any env-var defaults, matching
sbatch.
Acceptance criteria
Notes
Scope is comma-separated explicit node names. Slurm hostlist patterns (node[001-010]) are out of scope here; the scheduler filter currently does exact-name matching, and sbatch -w has the same limitation today. Track pattern expansion separately if needed.
Problem
srunandsallocdo not accept-w/--nodelist(or-x/--exclude).sbatchaccepts both. This breaks a common Slurm workflow: pinning an interactive or parallel job to specific nodes.Root cause
This is a CLI wiring gap, not a scheduler limitation.
SrunArgsandSallocArgshave nonodelist/excludefields and never populateJobSpec.nodelist/JobSpec.exclude.The backend already supports both end to end:
JobSpec.nodelist(proto/slurm.proto:113),JobSpec.exclude(:114)sbatchalready sets them (crates/spur-cli/src/sbatch.rs)nodelistas an allow-list andexcludeas a deny-list (crates/spur-sched/src/backfill.rs:76)Expected behavior
srun -w <nodes>andsalloc -w <nodes>restrict placement to the listed nodes.srun -x <nodes>andsalloc -x <nodes>exclude the listed nodes.sbatch.Acceptance criteria
SrunArgsgains-w/--nodelistand-x/--exclude, wired intoJobSpecSallocArgsgains-w/--nodelistand-x/--exclude, wired intoJobSpecsrun -w <node>runs only on that node;srun -x <node>avoids itsbatchfor the same flagsNotes
Scope is comma-separated explicit node names. Slurm hostlist patterns (
node[001-010]) are out of scope here; the scheduler filter currently does exact-name matching, andsbatch -whas the same limitation today. Track pattern expansion separately if needed.