...
The following provides a high-level overview.
Explicitly Define a Partition
If you explicitly define a partition within your script then THAT is the partition (and subsequent nodes) that slurm will try to allocate your job across.
...
This definition overrides even if you have an investment.
If You Have An Investment
If your project does have an investment, and you do NOT define a partition, then behind the scenes Slurm will create a list of partitions to try to run your job against.
...
The above is only a brief summary of the hidden complexity on how Slurm allocates and prioritizes jobs, and there are caveats too subtle and wordy to go into in this short explanation.
Summary
If you explicitly define a partition then that is what will be used.
If you have an investment and specify no partition, Slurm will try allocating against this first, and then use a list of partitions if it can’t, and then queue the job if nothing is available at that moment in time.
...