You are writing a Slurm batch script to submit an AI training job that requires two NVIDIA H100 GPUs. Which Slurm parameter is specifically used to request these generic GPU resources and ensure the scheduler assigns the job to a node with available GPUs?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Alright, let's talk about scheduling. If you're running an AI cluster, you're probably using Slurm to manage who gets to use what. But Slurm was originally built for CPUs, so it doesn't automatically know that your job needs GPUs unless you tell it. The secret sauce here is the --gres parameter, which stands for Generic Resources. You use it in your submit script to say, 'Hey Slurm, I need two GPUs of a specific type.' The scheduler looks at that and routes your job to a node that has those GPUs free. If you use --partition, you're just pointing your job to a logical group of servers, but that doesn't guarantee you'll get allocated the actual GPUs. --qos handles your job priority, and --time is just the countdown clock before Slurm kills your job. To get the actual GPU hardware, you must use --gres.
Full explanation below image
Full Explanation
Slurm is a popular open-source cluster management and job scheduling system for Linux clusters. To handle non-standard resources like GPUs, accelerators, or high-speed storage, Slurm uses the concept of Generic Resources, configured via the Gres parameter. - The --gres option (Option B) is used in job submission scripts (such as #SBATCH --gres=gpu:2) to request specific numbers and types of GPUs. The scheduler uses this information to track GPU utilization on each node and ensure that jobs are only allocated to nodes with sufficient free GPU resources, preventing resource conflicts. - --qos (Quality of Service) (Option A) defines the priority and resource limits (like maximum run time or maximum jobs per user) but does not handle physical hardware allocation. - --partition (Option C) specifies the queue or logical node grouping to which the job is submitted. While partitions can be set up to contain only GPU nodes, the partition parameter itself does not request or allocate individual GPUs to a job. - --time (Option D) sets the maximum wall-clock time limit for the job, after which it is terminated by the scheduler.