pytorch runtime_error ai_generated true

RuntimeError: DDP initialization failed: NCCL error

ID: pytorch/ddp-init-error

Also available as: JSON · Markdown
78%Fix Rate
82%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
2 active

Root Cause

Distributed Data Parallel initialization failed.

generic

Workarounds

  1. 90% success Set MASTER_ADDR, MASTER_PORT and verify NCCL connectivity
  2. 88% success Use torchrun for proper process group initialization

Dead Ends

Common approaches that don't work:

  1. Use DataParallel instead of DDP 72% fail

    Slower, GIL-bound

  2. Run on single GPU 68% fail

    Loses multi-GPU speedup