[slurm-users] Job requesting two different GPUs on two different nodes

Gestió Servidors sysadmin.caos at uab.cat
Tue Jun 8 13:55:02 UTC 2021


Hi,

Today, doing some tests, I have not got a solution to write a submit script that requests 2 different GPUs on 2 different nodes. With this simple script:

#!/bin/bash
#
#SBATCH --job-name=N2n4
#SBATCH --output=N2n4-CUDA.txt
#SBATCH --gres=gpu:GeForceRTX3080:1

#SBATCH -N 2 # number of nodes
#SBATCH -n 4 # number of cores
#SBATCH --partition=cuda.q

module load cuda/11.2

sleep 100
mpirun /home/caos/druiz/samples-SLURM/OpenMPI/mpihello-3.0.0

I get a parallel MPI job in two nodes, two process in each node and one GeForceRTX3080 in each node. However, if I want to request 2 different GPUs, I can't write "#SBATCH --gres=gpu:GeForceRTX3080:1, --gres=gpu:GeForceRTX2070:1" because line "#SBATCH --gres=" is for each node and, then, a line containing two "gres" would request a node with 2 different GPUs. So... is it possible to request 2 different GPUs in 2 different nodes?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20210608/c3a07447/attachment-0001.htm>


More information about the slurm-users mailing list