A 32-rank run deadlocks in the column path of the P/Q forming at a chain end

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

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active

Research direction

Start by comparing form_comp_Q_gpu, col_chunks_to_rows, and col_slab_end in comp_pq_forming.cpp, then inspect the related changes in bond_ops.cpp. Reproduce the 32-rank U(1) run with pq_scatter enabled and compare the collective sequence across ranks, especially at chain ends where ranks own no A/B pairs. Done means the deadlock is understood and prevented, with a reproducer or regression test demonstrating that all ranks make consistent collective decisions.

Written by the indexing model from the issue text.

Description

bug cpp

🤖 AI text below 🤖

What happens

A U(1) run on 32 ranks hangs deterministically in the P/Q forming at a chain end, in the default mode (pq_scatter on, the reduce-scatter column path). With COMPOP_PQ_SCATTER=0, where the slabs are completed by an all-reduce, the same run passes.

  • System: P450 transition state, CAS(51,50), 2Sz = 1, unrestricted integrals, Fiedler order of the exchange matrix.
  • Layout: 8 nodes × 4 H100 (Hartree Centre), one rank per GPU, 32 ranks.
  • Code: de9e726 (main of 2026-11-24). It also hangs with that commit unmodified, in the same container image.
  • Where: the seed stage (bond dimension 1000, start from the HF determinant), sweep 1, bond 46→47, at the chain end. It hangs there in every attempt (jobs 513646 and 513652).
  • Not affected: the reactant complex of the same system, with the same settings on the same nodes, runs through with the column path.

Where the ranks stand

The stacks come from the crash handler (a SIGSEGV sent to the main thread of every rank; ptrace is not permitted on the nodes). All 32 ranks are in form_comp_Q_gpu on the column path:

  • 2 ranks (26 and 28) are in col_chunks_to_rows, in the MPI_Alltoallv of the row hand-off;
  • the other 30 are in col_slab_end, in an NCCL reduce-scatter that never completes.

So the ranks disagree on the sequence of collectives before this point. Under MPI, every decision that changes control flow must come out the same on all ranks (AGENTS.md), and one of them doesn't here.

Suspect

A rank-dependent decision at the chain end, where few A/B pairs exist and some ranks own none: for example whether a rank hydrates its A/B on the device (total > 0) and therefore enters or skips a collective. This has the same trigger as #25 (a rank that owns no A/B pair of a block at a chain end, which is always the case above 10 ranks), but a different path: the column completion, not formpq_release or the stash, both fixed in #25.

Not known yet

  • Whether current main still hangs. Since de9e726, #89 has changed comp_pq_forming.cpp and bond_ops.cpp for the distributed host path, and the device column path has not been rerun at this size.
  • A small reproducer. The gates of #83 (up to np = 8, CAS(10,10)) don't hit it.

Workaround

COMPOP_PQ_SCATTER=0 (or pq_scatter=0 in tuning). The run then completed (5:59 h on 32 GPUs).

Related: #25, #83.

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

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.