--- title: "HPC205 Scaling Up: Mastering HPC" subtitle: "SciNet Education" author: - Jaime Pinto date: "December 7, 2026" --- ## Expected background - Familiarity with Linux and the command line - Basic Slurm job submission and software modules - Familiarity with scientific programming and parallel computing #### Focus: integration, not introduction ## Ask questions throughout the course - Log in now: https://chatbot.scinet.utoronto.ca - Ask Trillium-specific questions as we go - Get help tailored to your account and jobs - Continue using the course chat for questions and discussion ## Topics covered [[ - Course scope - Workflow mindset - CPU and GPU application models - Resource mapping - Validation discipline - Modules & environments - Compilation - Software stacks - Reproducibility || - Interactive testing - Batch workflows - Monitoring & scaling - Production execution - Failure modes - Job arrays - Checkpointing - Debugging - Workflow checklist ]] ## Course scope - Not a Linux, Slurm or programming tutorial - Not a performance engineering course - Integrate CPU and GPU workflows end-to-end - Avoid wasting cluster resources; scale efficiently #### How to structure decisions, not commands ## Core idea - Small mistakes become expensive at scale - Compute time is expensive; failures multiply with resource count - Debugging at scale is difficult - HPC success = controlled progression #### This is a workflow discipline problem, not a coding problem ## Workflow progression model - initial test using OOD or the appropriate login node - small validation (1–4 CPU cores or 1 GPU) - scale within a node - multi-node scaling (if supported) - production runs #### The goal is not “it runs” but “it runs correctly at scale” — don’t skip steps ## Trillium execution model (CPU nodes) - Full-node scheduling (you get the whole CPU node) - 192 cores per node - Full node memory available - 24 hours request time maximum - Slurm controls resource allocation #### workflow design must match node and cluster boundaries ## Trillium execution model (GPU nodes) | GPU type | GPUs per node | Allocation options | |----------|---------------|--------------------| | H100 | 4 | 1 GPU or full nodes | | B200 | 8 | 1 GPU or full nodes | - Fractional GPUs are available only through Open OnDemand (OOD) - Host RAM is assigned per GPU or per node, depending on partition - Single-GPU jobs share a node; full-node jobs are exclusive #### GPU allocation is not necessarily full-node allocation ## CPU and GPU login environments - CPU: `trillium.alliancecan.ca` - GPU: `trillium-gpu.alliancecan.ca` - GPU login node: 4 shared H100 GPUs; brief correctness tests only - Submit and inspect jobs from the appropriate environment #### Separate clusters, separate Slurm schedulers ## Choosing between H100 and B200 | Resource | H100 | B200 | |----------|------|------| | GPUs per node | 4 | 8 | | GPU memory | 80 GB | 180 GB | | CPU cores per node | 96 | 96 | - Start with H100 when it meets the workload needs - Consider B200 for larger device memory or measured performance gains - Verify software compatibility and access before submission ## CPU workflow progression | Stage | Resource | Purpose | |-------|----------|---------| | OOD | Small CPU session | Functional test | | Login | Shared CPU resources | Brief correctness test | | Debug | 1 CPU node | Baseline time and memory | | Batch | 1 CPU node | Validate scheduled execution | | Within node | Up to 192 cores | Measure within-node scaling | | Multi-node | 2+ CPU nodes | Measure distributed scaling | ### Advance only when the previous stage is validated ## GPU workflow progression (H100) | Stage | Resource | Purpose | |-------|----------|---------| | OOD | Fractional GPU | Functional test | | Login | Shared H100 | Brief correctness test | | Debug | 1 GPU | Baseline time and memory | | Batch | 1 GPU | Validate scheduled execution | | Full node | 4 GPUs | Measure within-node scaling | | Multi-node | 8+ GPUs | Measure distributed scaling | ### Advance only when the previous stage is validated ## HPC Terminology (CPU hardware vs Slurm) | Term - Hardware | Meaning | |-----------------|-----------------------------------------------------------------------| | Node | One compute server in the cluster | | Socket | Physical CPU package installed on a node motherboard | | Core | Physical processing unit inside a CPU | | Thread | Hardware execution context (distinct from a software thread) | | Memory | RAM available to the node | | Term - Slurm | Meaning | |-----------------|-----------------------------------------------------------------------| | Task | One running process (often an MPI rank) | | CPU | Slurm scheduling unit assigned to a task | | cpus-per-task | Number of CPUs allocated to a task (commonly used for OpenMP threads) | | ntasks | Requested number of tasks (processes) | | ntasks-per-node | Number of tasks placed on each node | ## HPC Terminology (GPU resources) | Term | Meaning | |------|---------| | GPU | Accelerator for supported computations | | VRAM | Memory on the GPU | | Host memory | CPU-side system RAM | | CUDA | NVIDIA GPU programming platform | | GRES | Slurm generic resources (e.g. GPUs) | - CPU cores and GPUs are separate resources - GPU memory and host memory are not interchangeable ## Identifying your application - Does my application run on CPUs, GPUs, or both? - Is it serial, OpenMP, MPI, or hybrid? - If GPU-enabled, does it support multiple GPUs? - Is it my own code or third-party software? - Is it containerized or subject to licensing constraints? - Does it work from the Linux command line and in batch mode? ### Design the execution strategy before touching Slurm ## Choosing the execution model - Identify the CPU and GPU capabilities of your application - Determine how work is divided across processes and devices - Consider host memory and GPU memory requirements - Match the model to single-node or multi-node execution - Validate assumptions before scaling up ### Model choice determines everything downstream ## Serial applications (baseline case) - A serial CPU application uses one core - On a 192-core CPU node, one serial job uses ~0.5% of the cores - On Trillium this will be flagged and you will be contacted - Pack independent serial jobs onto the same node - check [\alert{Running Serial Jobs on Trillium}](https://docs.scinet.utoronto.ca/index.php/Running_Serial_Jobs_on_Niagara) (example script at the end) - also check [\alert{META-Farm}](https://docs.alliancecan.ca/wiki/META-Farm) ### Improve node utilization without changing the application ## OpenMP model (shared memory) - One process creates multiple threads sharing the same RAM - CPU-only OpenMP scales within one node (up to 192 cores) - In Slurm terms: - `--nodes=1` - `--ntasks=1` - `--cpus-per-task=N` - Set `OMP_NUM_THREADS` to control the thread count ### One process, many threads, shared memory ## OpenMP Model (Cont.) - OpenMP execution template ```bash #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --cpus-per-task=192 export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK ``` - cpus-per-task = number of CPUs allocated - OMP_NUM_THREADS = number of OpenMP threads used by the program - Do not exceed the allocated CPUs with OpenMP threads ### For a pure OpenMP application, use one process and multiple threads ## MPI model (multi-node scaling) - MPI uses processes (ranks) that exchange messages - Ranks can run within one node or across multiple nodes - Each rank has its own address space - Inter-node communication uses the cluster network - Use MPI when one node is insufficient (memory or compute) ### MPI enables scaling from one node to many nodes ## MPI model (Cont.) - MPI execution template ```bash #SBATCH --nodes=2 #SBATCH --ntasks-per-node=192 # After loading Open MPI modules: source /scinet/vast/etc/vastpreload-openmpi.bash mpirun ./mpi_code ``` - Each rank works on a portion of the problem - Good decomposition balances computation and communication ### ntasks = how you distribute the workload, not just a Slurm setting ## Hybrid model (MPI + OpenMP together) - MPI distributes work among processes (ranks) - OpenMP provides multiple threads within each rank - Ranks can be placed within or across nodes - Balance ranks and threads to use CPU resources efficiently - Fewer ranks may reduce communication overhead ### Hybrid = MPI processes + OpenMP threads ## Hybrid model (Cont.) - Hybrid execution template (CPU nodes) ```bash #SBATCH --nodes=8 #SBATCH --ntasks-per-node=48 #SBATCH --cpus-per-task=4 export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK # After loading Open MPI modules: source /scinet/vast/etc/vastpreload-openmpi.bash mpirun ./hybrid_code ``` - 48 ranks × 4 threads = 192 cores per node - Experiment with rank/thread combinations; measure efficiency ## Execution models on 192-core node | Model | Structure | Memory model | Key idea | |---------|-------------------------|---------------------|---------------------------| | OpenMP | 1 process × 192 threads | Shared memory | One program, threaded | | MPI | 192 processes (ranks) | Distributed memory | Many independent processes| | Hybrid | 48 ranks × 4 threads | Mixed (MPI + OpenMP)| Two-level parallelism | ### Core rule: MPI distributes work across ranks; OpenMP uses threads ## CPU binding (why it matters) - CPU binding restricts processes to selected CPU cores - OpenMP thread placement is controlled separately ```bash export OMP_PLACES=cores export OMP_PROC_BIND=close ``` - Match MPI rank placement to the allocated CPUs - Poor binding causes overlapping ranks and inconsistent performance ### Allocation and binding are different concepts ## GPU resource mapping - CPU processes launch and coordinate GPU computations - GPUs have separate device memory (VRAM) - CPU threads can prepare data for GPUs - Multi-GPU execution requires application support - Match process and device mapping to the application ### GPU count and MPI rank count are not inherently the same ## Single-GPU execution template - Request one GPU and its associated host resources ```bash #SBATCH --nodes=1 #SBATCH --gpus-per-node=1 #SBATCH --time=00:30:00 ``` | GPU | CPU cores | Host RAM | Node share | |-----|-----------|----------|------------| | H100 | 24 | ~188 GiB | 1/4 | | B200 | 12 | ~250 GB | 1/8 | ### Do not request host memory (--mem); Slurm assigns it ## Multi-GPU execution template - Example: full B200 node, one task per GPU ```bash #SBATCH --nodes=1 #SBATCH --gpus-per-node=8 #SBATCH --ntasks-per-node=8 #SBATCH --cpus-per-task=12 ``` - H100: 4 GPUs, 4 tasks, 24 CPU cores per task - Match the task layout to the application; omit --mem ### Multiple GPUs require explicit application support ## Resource Allocation vs Resource Usage - Slurm allocates CPUs, GPUs and host memory - CPU-only jobs on Trillium receive full nodes - GPU jobs receive host RAM automatically; omit --mem - Applications determine how allocated resources are used | Resource | Usage determined by | |----------|---------------------| | CPU cores | Processes and threads | | GPUs | Application device mapping | | Memory | Application data and workload | ### Allocation does not guarantee utilization ## Launching Applications on a Cluster | Application Type | Typical Launch | |------------------|----------------| | Serial | ./code | | OpenMP | ./code | | MPI | mpirun ./code | | Hybrid MPI+OpenMP | mpirun ./code | | Single-process GPU | ./gpu_code | | Command | Role | |---------|------| | mpirun / mpiexec | MPI runtime launcher | | srun | Slurm job-step launcher | ## Launching multi-GPU applications - Some applications manage multiple GPUs in one process - Others require one process per GPU - MPI-based GPU codes may use mpirun - Distributed PyTorch may use torchrun - Follow the application's documented launch method ### Requesting GPUs does not automatically distribute the work ## mpirun / srun / mpiexec Recommended order: ```bash mpirun ./mpi_code If problems occur: srun ./mpi_code then: mpiexec ./mpi_code ``` Why? - MPI environments on Trillium are tested with mpirun - Supported MPI runtimes can detect Slurm allocations - VAST MPI preload works with mpirun, not srun ### This is recommended for Trillium ## MPI jobs: VAST optimization - After loading the MPI modules, source the matching script: ```bash # Open MPI source /scinet/vast/etc/vastpreload-openmpi.bash # Intel MPI (alternative) source /scinet/vast/etc/vastpreload-intelmpi.bash ``` - Use only the script matching your MPI implementation - Launch with `mpirun`, not `srun`, for this optimization ### Trillium-specific optimization for VAST I/O ## Containers - Ready-to-use application environments (e.g., [Apptainer](https://docs.alliancecan.ca/wiki/Apptainer)) - Package binaries, libraries, frameworks and dependencies together - Avoid complex installation; reproduce environments across clusters - Use `apptainer exec --nv` for NVIDIA GPU access - The underlying OpenMP, MPI or GPU execution model still applies ### Containers simplify deployment, not resource mapping ## Software environment (what actually matters) - Modules define environment stacks - Compiler, MPI and libraries must match - Build and runtime environments must be consistent - Mismatches can cause failures or incorrect execution ### Reproducibility depends on environment correctness ## GPU software environment - CUDA provides the NVIDIA GPU programming environment - cuDNN and NCCL support specific GPU workloads - Frameworks may supply their own CUDA runtime libraries - Check compatibility with the target GPU and host driver - Record the working modules and application versions ### H100 and B200 may require different software versions ## AlphaFold2/3 example: why modules matter - Old stack: - StdEnv/2020 gcc/9.3.0 openmpi/4.0.3 cuda/11.4 cudnn/8.2.0 python/3.8 hmmer/3.2.1 kalign/2.03 openmm-alphafold/7.5.1 hh-suite/3.3.0 - Problem: - outdated modules (StdEnv/2020 stack deprecated or no longer available) - incompatible dependencies - fragile portability across systems - → classic “legacy environment failure” - to use the old stack may need to create a container - → the lesson is that software environments change over time ### if possible, always stick with the most recent software stack ## Module strategy - Resolving environments ```bash module load StdEnv/2023 hmmer-alphafold3/3.4 module load gcc openmpi cuda cudnn python module list ``` - start from application module - let system resolve dependencies (do not specify version initially, if possible) - inspect final resolved stack - use `module spider software` to check modules available, and to learn how to load them - → compatibility becomes system-driven within CVMFS available modules ## Module workflow pattern - verify final environment (module list) - Currently Loaded Modules: ```bash StdEnv/2023 ucx/1.14.1 mii/1.1.2 libfabric/1.18.0 gcc/12.3 pmix/4.2.4 openmpi/4.1.5 kalign/3.3.5 cuda/12.6 hmmer-alphafold3/3.4 cudnn/9.10.0.56 python/3.11.5 nccl/2.26.2 ``` - record THIS working configuration - this is the “known good state” ### reproducibility through explicit environment & modules versions from now on ## Compilation rule (must match runtime environment) - Compile on the appropriate Trillium login node - Login nodes match compute architecture and have internet access - Load StdEnv before building (not loaded by default on Trillium) - Build after environment setup; do not mix module stacks - \alert{do not load modules from the .bashrc} ### Runtime environment must match compile environment ## Building GPU applications - Use the GPU login environment for GPU software builds - Select CUDA and libraries supported by the application - For CUDA source, target the intended GPU architecture - Prebuilt packages must also support the target GPU - Use allocated GPUs for performance validation ### A successful build does not guarantee GPU execution ## Commercial software (what changes, what doesn’t) - Precompiled, vendor-controlled codes (ANSYS, COMSOL, VASP) - Parallel capabilities depend on the vendor implementation - Still map execution to nodes, tasks, threads and GPUs - External license servers may require network access - Shared licenses are limited: a job may run today but not tomorrow - Your institution may need to purchase a license ### Licensing does not change HPC scaling rules ## Batch submission baseline workflow - Work in \$SCRATCH (\$HOME and \$PROJECT are read-only on compute nodes) - Keep inputs, outputs, scripts and logs together for debugging - Keep default Slurm output/error locations until the workflow works - If external data is needed: - Download first on login nodes or datamovers (`tri-dm1`–`tri-dm4`) - Execute offline on debug/compute nodes - Arrange external license access if required ### Reproducibility starts with file organization ## Open OnDemand (OOD): Stage 0 - [ondemand.scinet.utoronto.ca](https://ondemand.scinet.utoronto.ca) - Scheduled desktop or Jupyter sessions may queue - CPU: test correctness and explore thread counts - GPU: select a fractional H100 for functional tests - Close the session when finished - Dedicated OOD training: [SciNet Education](https://education.scinet.utoronto.ca) ### Use allocated compute nodes for scaling benchmarks ## OOD: fractional GPU validation - Documented profile: H100 MIG, 10 GB device memory - Approximately 1/8 of a full H100's compute capacity - Check the visible device inside the session ```bash nvidia-smi -L nvidia-smi ``` - Run a small GPU-enabled application test ### Functional validation, not production benchmarking ## Initial correctness check - Start with one CPU core or one GPU, as appropriate - Use a small representative input - Confirm outputs, exit status and absence of errors ### goal: eliminate “does it run at all?” failures ## First parallel scaling check (CPU) - Run OpenMP or small MPI (2–4 cores total) - Verify correctness against the initial test - Check for excess threads or MPI ranks - Measure runtime before increasing resources ### Confirm the parallel model behaves correctly ## First GPU scaling check - Validate a small workload on one GPU - Check GPU utilization and device memory (nvidia-smi) - Test a full GPU node only if the application supports it - Compare correctness and runtime before adding nodes ### More GPUs do not necessarily mean faster execution ## Validation principle (key rule) - Correctness first; scaling second - Measure performance before increasing resources - Test multi-node execution only when needed - \alert{PLEASE, REFRAIN FROM SUBMITTING A JOB FOR THE FIRST TIME ASKING ALREADY FOR THE MAX NUMBER OF NODES AND THE MAX AMOUNT OF TIME, IF YOU ARE NOT REASONABLY SURE IT WILL WORK, OR YOU WILL BE WASTING A LOT OF RESOURCES.} - The same rule applies to GPU requests. ### Do not scale broken code ## Interactive execution (CPU) - After login-node validation, request a debug session ```bash debugjob 1 # or salloc -N 1 --time=1:00:00 ``` - Higher-priority debug queue; full CPU node (192 cores) - Use for debugging, scaling and performance testing ## Interactive execution (GPU) - Request an interactive session with one H100 GPU ```bash debugjob -g 1 ``` - One GPU, 24 CPU cores and approximately 188 GiB host RAM - H100 `debug` partition: maximum 2 hours - On the allocated node, load the environment and check the GPU ```bash module load StdEnv/2023 cuda nvidia-smi ``` - B200: no debug partition; use a short regular job ## Multi-node interactive scaling (CPU) - The more nodes you ask with debugjob, the less time you have: debugjob 4 is only 15 minutes ```bash debugjob 2 # or salloc -N 2 --time=0:30:00 ``` - Validate distributed execution across CPU nodes - Test MPI behavior across nodes - Validate decomposition strategy before batch submission - → avoid jumping directly to batch multi-node runs ## Interactive multi-GPU execution (H100) - Validate on one GPU before requesting a full node ```bash debugjob -g 4 # one full H100 node debugjob -g 8 # two full H100 nodes ``` - H100 `debug_full_node`: maximum 1 hour, up to 2 nodes - Test communication, correctness and runtime - `debugjob` may assign shorter walltimes ### Scale across nodes only after validating one full node ## First batch jobs (CPU) - Start with one CPU node for a short debug job ```bash sbatch -N 1 --time=0:15:00 -p debug submit.sh # Then, if distributed execution is needed: sbatch -N 2 --time=0:30:00 -p debug submit.sh ``` - Validate behavior under scheduler conditions - \alert{Pay close attention to any error messages or notifications in the output logs. As a general rule, there are always hints and/or suggestions in the log files. Sometimes the error message may appear in the middle of the log, so please read the whole log.} ## First batch jobs (GPU) - Start with a short single-GPU batch job ```bash sbatch -N 1 --gpus-per-node=1 --time=0:30:00 submit.sh ``` - Check correctness, GPU utilization and memory usage - If more GPUs are needed, validate a full node first - Keep the problem size and runtime controlled ### Do not request multiple GPUs until one works correctly ## Walltime and scheduling efficiency - Estimate walltime from measured test runs - Include a reasonable safety margin - Shorter requests may fit more backfill opportunities - Avoid requesting 24 hours by default ### Request enough time, not the maximum time ## Job arrays - Run independent, self-contained jobs from one submission - Useful for parameter sweeps, datasets and repeated runs - No guaranteed execution order or coordination between elements - Each element has its own allocation: full CPU node or GPU allocation - Pack small serial CPU tasks instead of wasting full nodes - Reference: https://docs.alliancecan.ca/wiki/Job_arrays/en ### Inefficient array jobs multiply resource waste ## Live job inspection tools - squeue --me → job tracking - ssh compute node → inspect your running job - htop → CPU and host memory usage - free -g → node memory status - nvidia-smi → GPU utilization and device memory ### Inspect during execution, not only after failure ## Performance snapshot tool - This will give an overview of the performance of your job, i.e. CPU and memory usage ```bash user@tri-login03:~$ jobperf 13753632 --------------------------------------------------------------------------------- RUNNING USER MEMORY(MB) HOSTNAME #THD CPUUSE %MEM NAME USED AVAIL PROCESS NAMES --------------------------------------------------------------------------------- tri0001 40 97% 44.4% willis2 107889 85178 mpirun 2*srun 40*xhpl tri0002 40 98% 43.4% willis2 103190 89863 40*xhpl --------------------------------------------------------------------------------- ``` - CPU usage per node - memory consumption per user on each node - imbalance detection - → quick way to detect resource imbalance ## Monitoring scaling efficiency (my.scinet) - https://my.scinet.utoronto.ca - CPU utilization and memory usage over time - Compare historical resource-consumption graphs across scaling runs | Question | Tool | |----------|------| | Is my job running? | squeue | | CPU utilization? | htop / jobperf | | Host memory? | free / jobperf | | GPU utilization and VRAM? | nvidia-smi | ## Measuring CPU thread scaling - Use the same input and allocated CPU node - Vary `OMP_NUM_THREADS` for a threaded application | Threads | Runtime (s) | Speedup | |---------|-------------|---------| | 1 | 120 | 1.0 | | 4 | 35 | 3.4 | | 16 | 30 | 4.0 | ### Illustrative timings: pack independent runs if scaling flattens ## Live GPU monitoring - On your allocated GPU node: ```bash nvidia-smi -l 2 ``` - Check GPU activity alongside CPU activity - Frameworks may preallocate VRAM (e.g., JAX in AlphaFold3) - Compare framework memory statistics with nvidia-smi ### High VRAM usage does not imply high GPU utilization ## Shared GPU nodes and benchmarking - Single-GPU jobs may share host resources with other jobs - CPU, memory bandwidth and I/O contention can affect timing - Repeat measurements and report the variation - Compare equivalent workloads and allocation types ## Measuring GPU scaling - Compare the same workload on 1 GPU and a full GPU node - Keep GPU type and software environment fixed - Example: 1 GPU × 8 hours = 8 GPU-hours - Example: 4 GPUs × 3 hours = 12 GPU-hours - Speedup = 2.67×; parallel efficiency = 67% ### Faster execution can consume more GPU-hours ## GPU allocation costs - Resource usage is charged for allocated GPU time - H100: approximately 12.2 RGUs per GPU (rate to confirm) - B200: approximately 21 RGUs per GPU (rate to confirm) - A B200 GPU-hour costs about 1.72 times an H100 GPU-hour ### Compare total resource cost, not just runtime ## GPU resource waste: worked example - A single-GPU application runs for 2 hours - Requesting a full H100 node allocates 4 GPUs - Allocated: 8 GPU-hours; 3 GPUs remain idle - Requesting one GPU instead uses 2 GPU-hours ### Same runtime assumed; verify with a single-GPU run ## Common scaling failure modes (CPU) - Wrong MPI/OpenMP balance - Host memory exhaustion (OOM) - Idle cores (bad threading) - Poor decomposition strategy ### Many scaling failures originate in workflow design ## Common scaling failure modes (GPU) - Application falls back to CPU execution - GPU memory exhaustion (device OOM) - Multiple processes unintentionally use the same GPU - Idle GPUs due to data loading or communication - Incompatible CUDA software environment ### Verify resource usage before increasing the allocation ## Debugging workflow (practical) - Inspect logs first - Reduce problem size - Rerun interactively (CPU or GPU) - Check allocated resources and actual utilization - Isolate the failure before scaling again ## Debugging GPU applications - Check GPU visibility with nvidia-smi - Confirm the application is using the GPU - Check CUDA errors and device memory usage - Reproduce the failure with one GPU and small input - Use application diagnostics or CUDA debugging tools ## DDT (what it is for) - GUI parallel debugger - Supports MPI, OpenMP and CUDA debugging - Check installed version and license limits - Use when logs are insufficient ## Checkpointing - Save application state periodically to persistent storage - Restart from the last checkpoint after failures or interruptions - Continue computations beyond Trillium’s 24-hour job limit - Balance checkpoint frequency against I/O overhead - Finish writing before walltime expires; test restart before production - [SciNet checkpointing documentation](https://docs.scinet.utoronto.ca/index.php/Checkpoints) ### Avoid losing progress and wasting compute resources ## GPU checkpointing - Use the application's supported save and restart mechanism - For ML training: save model, optimizer and training progress - Coordinate checkpointing across ranks for distributed jobs - Verify that the restart works with the intended GPU layout ### GPU memory contents alone are not a checkpoint ## End-to-end workflow checklist [[ **Steps 1–4 (initial validation)** 1. Identify your application CPU / GPU / parallel model 2. Build the environment modules • compilers • libraries 3. Validate basic correctness Small CPU or GPU test (OOD / login) 4. Interactive validation `debugjob 1` / `debugjob -g 1` || **Steps 5–8 (scaling workflow)** 5. Small batch job Short runtime, few resources 6. Validate within-node scaling More threads / full GPU node 7. Scale across nodes if justified Measure runtime and utilization 8. Production execution Checkpoint and monitor ]] ## Resources & Further Help - Documentation - Trillium Quickstart and Alliance Documentation - SciNet Training Materials - Monitoring - my.scinet, jobperf, htop, squeue - nvidia-smi (GPU utilization and memory) - Debugging - logs first, DDT or GPU tools when necessary - Need help? - SciNet chatbot: Trillium-specific questions and job support - Support ticket or SciNet Education ## Resources links - my.scinet: https://my.scinet.utoronto.ca - docs: https://docs.alliancecan.ca - training (including Open OnDemand): https://education.scinet.utoronto.ca - status: https://docs.scinet.utoronto.ca - [Trillium documentation](https://docs.alliancecan.ca/wiki/Trillium) - SciNet chatbot: https://chatbot.scinet.utoronto.ca - Support tailored to your account and jobs - Support - Email to ******trillium@tech.alliancecan.ca****** or ******support@scinet.utoronto.ca****** - Still need help? Request a one-to-one consultation (request via email). ## Suggested exercises (self-paced) - CPU: compare thread counts on a small workload - GPU: check device visibility and run a small test - Record runtime and resource usage before scaling - Ask questions using the SciNet chatbot ### Optional exercises to complete independently after the course ## EXTRA SLIDES Reference scripts and debugging examples ## Serial Applications - This can be achieved using **GNU Parallel**, for example (parallel is available by default with the software stack): ```bash #!/bin/bash #SBATCH --nodes=1 #SBATCH --ntasks-per-node=192 #SBATCH --time=12:00:00 #SBATCH --job-name gnu-parallel-example # Turn off implicit threading in Python, R export OMP_NUM_THREADS=1 parallel -j "$SLURM_NTASKS" <