We are setting up Slurm on a single computer-server equipped with 4 GPUs. I have been trying to find a way to have Slurm allocate a job to a random GPU, where I use "random" in a relaxed way, meaning for instance that if GPU 1 is being used, then a new job requesting GPU resources should be allocated on a random GPU anomg those that are free (0, 2, 3)
The problem is that, as it is now, Slurm always allocates GPU0 first, then GPU1, then 2, 3. This causes GPU0 to execute considerably more jobs over time, and therefore wear down faster. A randomized selection would be better.
I have read the documentation regarding Sbatch etc, but it seems that one can select a specific GPU to run a job, but not pick it randomly as described above.