A run hangs when NCCL finds no socket interface, instead of falling back to MPI

Open
#129 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp

Research direction

Start with src/compop/comm/mpi.cpp around compop_nccl_bootstrap and src/compop/backend/gpu/device_coll.cu around compop_nccl_gen_unique_id; the issue identifies the ignored ncclGetUniqueId result as a possible cause. Reproduce with two ranks and NCCL_SOCKET_IFNAME=nonexistent0, then check how the error and unique ID are shared across ranks. Done means the run skips NCCL together and completes through the available MPI or host-staging fallback, with the warning text cleaned up as described.

Written by the indexing model from the issue text.

Description

bug cpp

🤖 AI text below 🤖

When NCCL can't start its bootstrap, a run on several GPUs hangs. It doesn't fall back to CUDA-aware MPI or host staging, as the comment in compop_nccl_bootstrap says it should.

To reproduce: 2 ranks on one node with 2 A100s, NCCL 2.19.3, and NCCL_SOCKET_IFNAME=nonexistent0. Both ranks print

bootstrap.cc:48 NCCL WARN Bootstrap : no socket interface found

and then nothing happens until the job is killed. The same happens at #122's head (3043d958) and at its base, #103 (e7c9d99f), so the hang is older than #122. With NCCL_NET=bogus NCCL fails with an error instead, and the fallback of #122 works: one warning, the same nccl_skip_reason() on both ranks, and the run finishes on CUDA-aware MPI.

A possible cause, not confirmed: I couldn't attach a debugger on that cluster. compop_nccl_gen_unique_id ignores the result of ncclGetUniqueId. When that call fails, rank 0 broadcasts a zeroed id, and ncclCommInitRank may wait on it instead of returning an error. Rank 0 could check the result and broadcast it with the id, so that every rank skips NCCL together.

Also from the review of #122: the fallback warning gives two hints, NCCL's own (run with NCCL_DEBUG=WARN for details) and ours (NCCL_DEBUG=INFO to diagnose; ...). Only COMPOP_DEVICE_MPI=0 needs to stay in ours.

Dominant language
C++
Stars
3
Forks
0
Avg merge
2d 8h
Merged PRs (30d)
31

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Algorithmiq/exa-dmrg

All issues in Algorithmiq/exa-dmrg

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.