Distributed Training on HPC

Distributed training on HPC combines model training, GPU topology, storage, network, and scheduler behavior. The model-side concept is Distributed training; this page focuses on public cluster execution patterns.

The cluster view is:

What Belongs Here

TopicRoute
Slurm resource shapeResource request
Generic Slurm scriptSlurm job script
GPU memory and utilizationGPU
Dataloader and storage stallsStorage and IO
Distributed algorithm conceptDistributed training concept
Single-node training checksTraining run, Distributed training

Launch Contract

A public distributed training note should state the shape, not site-specific cluster details:

Record these fields generically:

FieldWhy It Matters
nodesnetwork communication boundary
GPUs per nodetopology and intra-node bandwidth
processes per GPUusually one process per GPU for DDP
effective batch sizechanges optimization and scaling
precisionmemory and tensor-core behavior
checkpoint intervalrecovery cost and storage pressure
launch methodscheduler integration and environment propagation

Scaling Checks

SymptomLikely Cause
single GPU works, multi-GPU divergeseffective batch, learning rate, gradient sync, seed/sampler mismatch
more GPUs do not speed upcommunication, dataloader, small batch, synchronization, scheduler layout
occasional hangsrank failure, network timeout, checkpoint barrier, uneven dataloader
OOM only in distributed runper-rank batch, gradient buckets, sharding, activation memory
checkpoint resume changes behaviormissing optimizer, scheduler, RNG, sampler, scaler, or sharding state

Safe Public Notes

Do not publish private scheduler partitions, account names, hostnames, node names, ports, usernames, internal paths, live utilization, or unpublished results. Use placeholders such as gpu-node, <partition>, <account>, <num_nodes>, and /path/to/project only when a command template needs them.

Minimal Workflow

  1. Verify a single-device run.
  2. Verify a single-node multi-GPU run.
  3. Verify multi-node launch with a tiny smoke test.
  4. Measure step time, dataloader time, GPU utilization, memory, and communication overhead.
  5. Add checkpoint/restart before long runs.
  6. Reconcile job state before relaunching.