Question 5
UnclassifiedHow do you submit a Slurm batch job requesting 4 GPUs?
Correct answer: D
Explanation
A Slurm batch job requests GPUs by specifying the GPU count in the job submission options, such as "--gpus=4" or an equivalent partition/account setting that allocates four GPUs. If both B and C describe valid GPU-request syntax, then "Both B and C" is right because each method asks Slurm for 4 GPUs.
Why each option is right or wrong
A. sbatch --gpu=4 script.sh
B. sbatch --gres=gpu:4 script.sh
C. sbatch -G 4 script.sh
D. Both B and C
Under Slurm’s resource request syntax, GPUs are allocated through the job submission options in the sbatch/srun command line, and a request for four devices is expressed with the GPU count set to 4 (for example, the generic GPU resource flag or an equivalent typed-GPU request). If both listed choices use valid Slurm resource-request forms that each specify 4 GPUs, then the combined option is the only answer that matches the allocation request in the job submission step.