ERROR
cuda
runtime_error
ai_generated
partial
RuntimeError: NCCL error: Timeout (NCCL_ERROR_TIMEOUT)
ID: cuda/nccl-timeout-distributed
65%Fix Rate
82%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 12 | active | — | — | — |
Root Cause
NCCL collective operation timed out during distributed training. One or more GPUs fell behind or lost network connectivity.
genericWorkarounds
-
88% success Set NCCL_DEBUG=INFO to identify which rank and operation hangs
NCCL_DEBUG=INFO torchrun --nproc_per_node=8 train.py
-
82% success Check NVLink/InfiniBand connectivity between GPUs
nvidia-smi topo -m # verify NVLink topology
-
85% success Ensure all ranks reach the collective at the same point (no conditional branching)
All processes must call the same collectives in the same order; check for if/else around all_reduce
Dead Ends
Common approaches that don't work:
-
Increase NCCL_TIMEOUT to very large values
80% fail
Masks the real issue (GPU hang, network failure); training will hang silently instead of crashing
-
Disable NCCL and use Gloo backend
88% fail
Gloo is CPU-based for GPU tensors; 10-100x slower for large models
Error Chain
Preceded by: