Block CPU-only jobs on GPU servers

Is there a way to block users from running CPU-only jobs on GPU servers? We would like to ensure that GPU servers are being utilized for GPU jobs, but I can’t seem to find any documentation relating to this.

Hi,

If job submission is managed through a cluster lane, you could make use of jinja statements in cluster_script.sh, like so…

## SLURM EXAMPLE
...
{%- if num_gpu == 0 %}
#SBATCH --partition=cpu
{%- else %}
#SBATCH --partition=gpu
{%- endif %}
...

Cheers,
Yang

1 Like

Hi Yang,

Thanks for that, unfortunately we are not using a cluster lane. We may end up moving to that though if there’s no other way to implement it.