James
James

Reputation: 753

How do I set the order of nodes for a SLURM job?

I have a slurm setup with various partitions. In my slurm.conf, I have a list of computers that can run the jobs for my partition, eg.

PartitionName=hi Nodes=rack[0-4],pc1,pc2 MaxTime=INFINITE State=UP Priority=1000 PreemptMode=off

pc1 and pc2 have 3 cores available, the racks have 4 cores each. If I submit 4 jobs at once, it will allocate 3 to pc1 and 1 to pc2. I would like to alter the order that these are allocated. Specifically, I would like them to go on the racks first, then pc2, then pc1.

Any thoughts?

Ta, James

Upvotes: 4

Views: 3883

Answers (1)

damienfrancois
damienfrancois

Reputation: 59072

Use the weight parameter in slurm.conf when defining your nodes

From the manpage:

Weight The priority of the node for scheduling purposes. All things being equal, jobs will be allocated the nodes with the lowest weight which satisfies their requirements.

So for instance set weight=1000 for pc4, weight=100 for pc3 and weight=10 for the racks.

Upvotes: 3

Related Questions