Public course previewThis is not your assigned passport. No identity, answers, or completion progress are stored here.How to start your passport
Guided lesson
01 / 01About 20 minutesGPU resource planning

Review A One-GPU Euler Plan

Choose the next graphics processor (GPU) request from the supplied measurements. You already know how to read a job request and calculate total system RAM.

Where you will workOn the laptop or desktop in front of you
  1. 1Understand
  2. 2Try it yourself
  3. 3Check and submit

Before you start#

The measurements in this lesson are invented. No GPU allocation is needed.

A GPU is an accelerator for suitable calculations. A Slurm GPU request reserves it with supporting CPU, memory and time resources. es_fuge is the lab computing share used for this review. A partition is a group of compute nodes; keep its selection automatic here.

A reserved GPU can sit idle. Find what limits useful work before reserving more. System RAM is used by the CPU-side program; GPU memory (VRAM) is on the accelerator. --mem-per-cpu changes system RAM, not VRAM. Throughput is useful work completed per second.

The GPU waits for input#

A fictional one-GPU run spends 60% of its time waiting for the next input batch. What would you investigate or change first, and why? The table tells you where time is spent; it does not identify the precise cause.

A hint for the input wait

Adding an accelerator helps only if it can receive useful work. Inspect the waiting stage and approved data placement before changing GPU count.

Choose supporting resources#

After the input problem is fixed, three runs use the same representative workload and configuration. Assume one task on one node and exactly the CPUs requested. A supplied CPU comparison found four useful threads. The GPU in this fictional case has 24 GiB of VRAM.

Measurement Runs A / B / C
Elapsed (minutes) 12 / 13 / 14
System RAM peak (GiB) 10 / 11 / 12
GPU VRAM peak (GiB) 16 / 17 / 18

These are supplied application measurements, including all its processes, not a top-level MaxRSS field. Headroom means room for modest variation above the observed peak. Choose a next request for the same workload, not every future dataset.

A hint for memory and time

Multiply allocated CPUs by memory per CPU. Compare that system-memory total and the time limit with the largest values in the table. GPU VRAM cannot make up for a shortage of system RAM.

Is a second GPU useful enough?#

A separate controlled comparison keeps the input, amount of work and output quality equivalent. Rates cover the entire timed run, including setup and waiting. Repeated trials give the supplied representative rates:

GPUs reserved Useful throughput
1 100 samples per second
2 110 samples per second

For the same amount of work, does the small speed gain justify twice the reserved hardware? GPU reservation time is GPU count multiplied by run time.

A hint for the comparison

Speedup is the new throughput divided by the old throughput. For fixed work, compare GPU count divided by throughput. Faster completion does not necessarily mean less total GPU reservation time.

Try your own request before opening the script model in the practical step.

A starter limit is a ceiling, not a target. For real work, review representative measurements and any multi-GPU request with your supervisor.

Start the practice

Practice

Follow the steps

Follow in order

Steps

All measurements on this page are fictional. This review needs no Euler connection or GPU allocation. The planning decisions and local script review are separate exercises.

Optional: using the terminal

A command is a line of text that tells a computer to do one task. You paste it into a terminal, the text application used for commands. A shell is the part inside that application that reads the command. PowerShell, zsh, and Bash are shells. Open only the application named for your computer below; it starts its configured shell. Follow the shell named below. You do not need to install a separate Bash or zsh application.

Your computer or local means the laptop or desktop in front of you. Remote means another computer reached through the network. A command affects whichever computer the step names, so check that label before pasting.

  • Windows: press the Windows key, type PowerShell, and open the result named PowerShell. Do not use Command Prompt, Git Bash, or WSL for a block labelled PowerShell.
  • macOS: press Command+Space, type Terminal, and press Return. Terminal normally starts the zsh shell. If it uses another shell, run zsh for this session.
  • Linux: open the app named Terminal from the applications menu. It normally starts the Bash shell. If it uses another shell, run bash for this session.

The prompt is the text beside the blinking cursor. For each card, check the named computer, choose Copy, paste only the command after the prompt, press Enter once, and wait for the prompt to return.

If you have never done this before, first run the harmless terminal-ready practice on the start page. It lets you practise copying, pasting, pressing Enter, and reading output before a setup command.

Practise one harmless command firstHow to open a terminal and run a command
  1. 01

    Read the three comparisons

    Read and answer on this web page

    Use the fictional tables above. Before revealing a hint, choose what you would investigate or request and why. Keep the observed system RAM separate from memory on the GPU.

    Look forYou have a reason for each decision, rather than only choosing the largest permitted request.

    Explanation and help
    What this means
    Review the practice file.
    Safe recovery
    Use the short hint next to the relevant table; no external tutorial is required.
  2. 02

    Review the local script

    On your computer

    In a local Passport, Prepare practice folder creates workspace/slurm/gpu_job.slurm.txt. For the practical exercise, keep one named GPU on es_fuge, remove the forced partition and --mem, and retain unique logs. Choose CPU, memory-per-CPU and time values you can justify from the supplied measurements, within the starter limits: 1-16 CPUs, at most 64 GiB total system RAM and a positive time no longer than four hours. The checker verifies bounds; compare the request with the measurements yourself. Save a UTF-8 file smaller than 100000 bytes. Use ASCII digits without signs for CPU, memory and time values.

    Compare one reasonable request for the supplied measurements (file content)
    Put in fileBash file
    #!/usr/bin/env bash
    # FICTIONAL REVIEW FIXTURE - DO NOT SUBMIT OR EXECUTE
    #SBATCH --job-name=passport-gpu
    #SBATCH --account=es_fuge
    #SBATCH --gpus=rtx_4090:1
    #SBATCH --cpus-per-task=4
    #SBATCH --mem-per-cpu=4G
    #SBATCH --time=00:20:00
    #SBATCH --output=logs/%x_%j.out
    #SBATCH --error=logs/%x_%j.err
    
    # Review only; no training program is supplied.

    Look forThe text describes a one-GPU request; you have not run or submitted it.

    Explanation and help
    What this means
    Compare with the optional model only after choosing your values.
    Safe recovery
    Never execute the intentionally unsafe practice file. Open only this fictional file, not a research script.
  3. 03

    Inspect what you changed

    On your computer

    From the practice repository root, inspect the diff of the named file. This is a text review, not a Slurm syntax or performance test. The current checker enforces starter bounds; it cannot establish whether a real workload needs them. Slurm ignores directives after the first shell command. Keep every #SBATCH line before commands, with one unquoted long option and literal value per line. Keep each option only once. Use the supplied options; optional --nodes and --ntasks must each be 1.

    RunPowerShell on Windows
    git diff -- workspace/slurm/gpu_job.slurm.txt
    RunTerminal on macOS (zsh)
    git diff -- workspace/slurm/gpu_job.slurm.txt
    RunTerminal on Linux (Bash)
    git diff -- workspace/slurm/gpu_job.slurm.txt

    Look forOnly the intended fictional script changed; the plan stays within the lab review policy.

    If this differsIf unsure, leave the file unsubmitted and use Passport help. Do not request a real GPU merely to pass.

    Explanation and help
    What this means
    Answer the three questions, then use Check my work. Submit only after reviewing the generated exercise result.

Finish the lesson

Check and submit

Answer these 3 questions, then confirm the work you checked.

Every answer must be correct. Completion appears after the automatic GitHub check passes.

01In the first measurements, one GPU waits for input for 60% of the run. What should you investigate before requesting another GPU?Safety-critical
02The supplied three runs need up to 12 GiB system RAM and 14 minutes. The program can use four CPU threads. Which next request has reasonable headroom for this same workload?Safety-critical
03The controlled comparison gives 100 useful samples/second on one GPU and 110 on two. For the same amount of useful work, what does that justify?Safety-critical
Before submitting

The launcher will copy only this lesson's declared fictional practice files into the public submission. Review those files as well as these answers.

Open my real passport first

You can check sample answers here. Open your local Passport to check your practice files and submit the lesson.

Preview onlyYou can try the questions here. This page does not store or submit your answers.
Need help?Open recovery steps and AI-review guidance

If Blocked#

Use the hint beside the relevant table, then retry the sample question. If the local script is unclear, leave it unsubmitted and use the help request in your real Passport. Never paste real logs, private paths or credentials.

If needed, open only the GPU policy and return to this review. If an AI agent proposes a request, check its arithmetic and every changed directive yourself before accepting it.

Understand Before Accepting AI Output#

Check the CPU times memory calculation, time headroom and every directive yourself. The script check rejects repeated or late directives and options outside this exercise. It permits only one node and one Slurm task per job. It does not evaluate the program body, software compatibility or actual performance. Review these separately before any real submission.