When a multi-node training job hangs in an all-reduce, the cause is usually in the network setup, not in the training code. A first pass that rules out the common cases:
Turn on logging. Set NCCL_DEBUG=INFO (and NCCL_DEBUG_SUBSYS=INIT,NET if you want less noise). The log shows which transport NCCL picked (InfiniBand/RoCE vs plain sockets) and which interface it bound to.
Reproduce without your model. Run nccl-tests (all_reduce_perf) across the same nodes. If it hangs or is far below expected bandwidth, the problem is the fabric or the config, not your job.
Check interface selection. On multi-homed nodes NCCL can pick the wrong NIC. Pin it with NCCL_SOCKET_IFNAME, and for InfiniBand/RoCE with NCCL_IB_HCA.
Check the fabric itself. Verify link state and speed on every node (for example ibstat), and look for a single node with a degraded or down port.
Check that GPU Direct RDMA is actually in use if you expect it.…