How do users request two GPUs in a Slurm job?
Why B is the answer
--gres=gpu:2
GPUs are generic resources in Slurm.
In detail
- GPUs are generic resources in Slurm.
- GPUs are generic resources.
Use case
An illustrative scenario, not a real incident.
A user adds --gres=gpu:2, and Slurm allocates two GPUs.
See it in different ways
flowchart TD A["sbatch: submit"] --> B["squeue: see queue"] B --> C["sinfo: see nodes"] C --> D["scontrol: change state"] D --> E["sacct: see history"]
stateDiagram-v2 [*] --> Idle Idle --> Allocated: job starts Allocated --> Draining: admin drains it Draining --> Drained: last job ends Drained --> Idle: resumed after maintenance
flowchart LR S0["Add --gres=gpu2"] --> S1["Job queued"] --> S2["Two GPUs allocated"]
Key point: GPUs are requested with --gres.
Why the other options are wrong
- A. --account=2
- That is not how GPUs are requested.
- C. --memory=gpu2
- That is not a Slurm option.
- D. --nodes=gpu-2
- That is not how GPUs are requested.

