Block CPU-only jobs on GPU servers

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