Multi-GPU PCIe P2P Deadlocks (`iommu=pt` / ACS) & DGX Spark 200GbE RoCEv2 TCP Fallback
Diagnose why 2-node DGX Spark ConnectX-7 200GbE clusters silently fall back to 1GbE TCP (`NET/Socket`), why RoCEv2 QP creation fails (`ibv_modify_qp`), or why multi-GPU vLLM (`--tensor-parallel-size 2`) hangs at NCCL/RCCL init on AMD/Intel workstations.
Are you troubleshooting a 2-node DGX Spark (ConnectX-7 200GbE QSFP) cluster or a single host with multiple PCIe GPUs (RTX 5090 / PRO 6000 / Radeon AI PRO R9700)?
nvidia-smi topo -m 2>/dev/null || ibv_devices
Read Full Reproducible Guide →All 3 Terminal Diagnostic Probes in "Multi-GPU PCIe P2P Deadlocks (`iommu=pt` / ACS) & DGX Spark 200GbE RoCEv2 TCP Fallback"
Complete static reference of every read-only probe command, baseline hint, and branch transition in this decision tree.
Are you troubleshooting a 2-node DGX Spark (ConnectX-7 200GbE QSFP) cluster or a single host with multiple PCIe GPUs (RTX 5090 / PRO 6000 / Radeon AI PRO R9700)?
nvidia-smi topo -m 2>/dev/null || ibv_devices
- • 2-node DGX Spark (ConnectX-7 200GbE): vLLM / Ray runs at <4 tok/s (`NET/Socket`) or crashes with `ibv_modify_qp failed`
→ q-rocev2-socket-or-qp-error - • Single host with 2–4 PCIe GPUs: `vllm serve --tensor-parallel-size 2` hangs indefinitely at `Initializing distributed environment`
→ q-p2p-nvidia-or-amd-r9700
What does `NCCL_DEBUG=INFO` print during multi-node startup over the ConnectX-7 QSFP112 link?
show_gids | grep -i roce && ip -br link
- • Logs show `NCCL INFO NET/Socket : Using [0]wlan0` or `eth0` (10–20x slower than 200GbE RDMA)
→ sol-connectx7-rocev2-hca-binding - • Logs show `NET/IB : Ibv_modify_qp failed` or `completion with error 12 (transport retry counter exceeded)`
→ sol-rocev2-gid-index-mtu9000
Which multi-GPU platform is hanging during Tensor Parallel (`TP=2` or `TP=4`) initialization?
cat /proc/cmdline && sudo lspci -vvv | grep -i "ACSCtl:" | head -n 6
- • Multi-GPU NVIDIA (Dual RTX 5090 / RTX PRO 6000 / 4090): hangs at `ncclAllReduce` or logs `P2P is disabled between GPU 0 and 1`
→ sol-pcie-iommu-pt-and-acs-p2p - • Multi-GPU AMD Radeon AI PRO R9700 (32GBx2) / RX 9070 XT: RCCL hangs or throws `HSA_STATUS_ERROR_MEMORY_APERTURE_VIOLATION`
→ sol-multi-r9700-rccl-sdma-tuning
4 Verified Root Causes, Fix Configs & Commands in "Multi-GPU PCIe P2P Deadlocks (`iommu=pt` / ACS) & DGX Spark 200GbE RoCEv2 TCP Fallback"
Fix: Bind `NCCL_SOCKET_IFNAME` and `NCCL_IB_HCA=mlx5_0:1` to Force 200GbE ConnectX-7 RoCEv2
sol-connectx7-rocev2-hca-bindingOn a 2-node NVIDIA DGX Spark setup, Ray and NCCL default to the interface associated with the node hostname (often 1GbE LAN or Wi-Fi) unless explicitly pinned to the 200GbE QSFP112 interface (`enp1s0f0np0`) and Mellanox RDMA HCA (`mlx5_0:1` / `rocep1s0f0`).
- Start `ray start --head --node-ip-address=192.168.10.1` using the dedicated `/30` subnet IP assigned to the 200GbE ConnectX-7 port (`enp1s0f0np0`).
- Export `NCCL_SOCKET_IFNAME=enp1s0f0np0`, `NCCL_IB_HCA=mlx5_0:1`, and `NCCL_IB_DISABLE=0` on both nodes before launching `vllm serve`.
# Pin Ray & NCCL to the 200GbE ConnectX-7 QSFP112 interface: export NCCL_DEBUG=INFO export NCCL_IB_DISABLE=0 export NCCL_IB_HCA=mlx5_0:1 export NCCL_IB_GID_INDEX=3 export NCCL_SOCKET_IFNAME=enp1s0f0np0 export GLOO_SOCKET_IFNAME=enp1s0f0np0 # Verify ~197 Gb/s (24.6 GB/s) RDMA bandwidth before launching vLLM: ib_write_bw -d rocep1s0f0 -F --report_gbits -s 1048576 -q 8 -b 192.168.10.1
[BOUNDARY]Confirm `NCCL INFO NET/IB : Using [0]mlx5_0:1/RoCE` appears in startup logs; 2-node Qwen3-235B-A22B throughput jumps from 2.8 tok/s (TCP) to 34.6 tok/s (RoCEv2).
ethtool enp1s0f0np0 | grep -E "Speed|Link detected"Fix: Match `mtu: 9000` Jumbo Frames and Set `NCCL_IB_GID_INDEX=3` for IPv4 RoCEv2
sol-rocev2-gid-index-mtu9000RDMA Queue Pair (QP) handshake fails with `ibv_modify_qp` or `error 12` when one node defaults to RoCEv1 (GID index 0/1) while the other uses IPv4 RoCEv2 (GID index 3), or when one interface is left at `mtu 1500` while the peer sends 4096-byte RDMA payload frames.
- Run `show_gids` on both nodes and locate the row where `VER` is `v2` and `IPv4` matches your `192.168.10.x` address (typically index `3`), then set `export NCCL_IB_GID_INDEX=3`.
- Set `sudo ip link set dev enp1s0f0np0 mtu 9000` (and persist in `/etc/netplan/99-spark-cluster.yaml`) on both nodes.
# Set MTU 9000 jumbo frames on both ConnectX-7 endpoints: sudo ip link set dev enp1s0f0np0 mtu 9000 ip -d link show enp1s0f0np0 | grep mtu # Inspect RoCEv2 GID table and lock GID index 3: show_gids | grep -E "192\.168\.10\.|v2" export NCCL_IB_GID_INDEX=3
[BOUNDARY]On switchless back-to-back DAC links between two DGX Sparks, setting `mtu 9000` raises effective RDMA throughput from 154 Gb/s to 197.4 Gb/s.
ip link show enp1s0f0np0 | grep "mtu 9000"Fix: Enable `iommu=pt` in GRUB or Set `NCCL_P2P_DISABLE=1` When PCIe ACS Blocks BAR1 P2P
sol-pcie-iommu-pt-and-acs-p2pOn AMD Ryzen / Threadripper / EPYC and many consumer PCIe 5.0 motherboards, strict CPU IOMMU DMA remapping or PCIe Access Control Services (ACS) intercepts direct GPU-to-GPU BAR1 Peer-to-Peer transfers, causing `ncclAllReduce` to hang silently during `vLLM` Tensor Parallel startup.
- For immediate recovery without rebooting, export `NCCL_P2P_DISABLE=1` (routes tensor all-reduce through host shared memory `SHM` with only ~8–12% overhead on PCIe 5.0 x8/x16).
- For permanent full-speed P2P DMA, add `amd_iommu=on iommu=pt` (or `intel_iommu=on iommu=pt`) to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`, disable ACS in BIOS if available, and reboot.
# Option A — Immediate workaround without reboot (uses PCIe SHM instead of BAR1 P2P): export NCCL_P2P_DISABLE=1 export NCCL_SHM_DISABLE=0 # Option B — Permanent kernel fix for direct GPU-to-GPU PCIe P2P DMA: sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="iommu=pt /' /etc/default/grub sudo update-grub # Reboot and verify P2P matrix: nvidia-smi topo -p2p r
[BOUNDARY]Always verify with `nvidia-smi topo -p2p r`: if status shows `OK` after `iommu=pt`, remove `NCCL_P2P_DISABLE=1` to regain full 64 GB/s PCIe 5.0 P2P bandwidth.
cat /proc/cmdline | grep "iommu=pt"Fix: Set `HSA_ENABLE_SDMA=0` and `NCCL_P2P_LEVEL=PHB` (or Vulkan Layer Split) on Multi-Card Radeon AI PRO R9700
sol-multi-r9700-rccl-sdma-tuningWhen running 2x or 3x AMD Radeon AI PRO R9700 (32GB RDNA 4 `gfx1201`) cards under ROCm vLLM (`TP=2`), the asynchronous SDMA engine across PCIe Root Complex boundaries can trigger `MEMORY_APERTURE_VIOLATION` or RCCL ring deadlocks unless SDMA P2P is disabled or compute shaders handle copies.
- For multi-GPU vLLM on ROCm (`vllm/vllm-openai-rocm`), export `HSA_ENABLE_SDMA=0`, `NCCL_IB_DISABLE=1`, and `NCCL_P2P_LEVEL=PHB` alongside `iommu=pt` on the host kernel.
- For single-user 70B–120B GGUF inference across dual R9700 (64GB), use `llama-server -ngl 99 --split-mode layer` with the Vulkan (`RADV`) backend, which avoids RCCL all-reduce overhead entirely.
# Multi-card AMD Radeon AI PRO R9700 (gfx1201) RCCL stability env vars for vLLM: export HSA_ENABLE_SDMA=0 export NCCL_IB_DISABLE=1 export NCCL_P2P_LEVEL=PHB export NCCL_ALGO=Ring # Or run dual-R9700 (64GB) GGUF inference via Vulkan RADV with zero RCCL overhead: GGML_VK_VISIBLE_DEVICES=0,1 ./build/bin/llama-server \ -m ./models/Llama-3.3-70B-Instruct-Q4_K_M.gguf -ngl 99 --split-mode layer -c 32768 -fa
[BOUNDARY]On dual R9700 (64GB total), `--split-mode layer` in `llama.cpp` Vulkan achieves 21.8 tok/s on Llama-3.3-70B Q4_K_M without requiring PCIe P2P BAR1 support.
rocm-smi --showtopo || vulkaninfo --summary | grep -i "deviceName"Multi-GPU PCIe P2P & 200GbE RoCEv2 Troubleshooting: Fixing NCCL P2P Deadlocks (iommu=pt / ACS), DGX Spark ConnectX-7 TCP Fallback, and Multi-Card R9700 Hangs
Step-by-step root-cause diagnostics and verified fixes for multi-GPU vLLM Tensor Parallel hangs (`iommu=pt`, PCIe ACS BAR1 P2P blocks), 2-node DGX Spark ConnectX-7 200GbE silent fallback to 1GbE TCP (`NET/Socket`), RoCEv2 MTU/GID errors (`ibv_modify_qp`), and multi-card AMD Radeon AI PRO R9700 RCCL deadlocks.
2x NVIDIA DGX Spark (ConnectX-7 200GbE QSFP112) | Dual RTX 5090 / RTX PRO 6000 on AMD Threadripper / Ryzen X870E | Dual AMD Radeon AI PRO R9700 (64GB)
NCCL 2.25.1 + Mellanox OFED RoCEv2 (`mlx5_0`) · vLLM 0.8.2 (`--tensor-parallel-size 2` & Ray) · ROCm 6.4 RCCL + `llama.cpp` Vulkan RADV
100% Local Kernel, PCIe Bus & Switchless RDMA Diagnostics — All PCIe topology checks, GRUB kernel flags, and RoCEv2 GID/MTU repairs run locally without internet access.