Skip to content

Fix slow parallel checkpoint read (COMM_SELF + O(N^2) metadata loop) - #229

Merged
haykh merged 3 commits into
1.5.0rcfrom
chkpt_read_fix
Oct 5, 2026
Merged

haykh merged 3 commits into
1.5.0rcfrom
chkpt_read_fix

Conversation

@Alcauchy

Copy link
Copy Markdown
Collaborator

The restart reader opened the BP file on MPI_COMM_SELF, so every rank independently parsed the full global metadata instead of a single rank-0 read + broadcast. Phase 1 also had every rank loop over all g_ndomains reading each subdomain's extent/ncells via per-element Mode::Sync Gets. Both costs scale ~O(N_ranks^2) and made restart reads dominate wall time at large rank counts (~3 h at 65536 ranks vs a 2-3 min write).

  • Open the reader on MPI_COMM_WORLD so ADIOS2 reads/broadcasts metadata collectively and can aggregate reads.
  • In Phase 1, each rank now reads only its own subdomain entry and MPI_Allgathers the ncells/xmin/xmax arrays; global_extent and the reconstruction check are computed from the gathered layout. Non-MPI path unchanged.

Verified ~50x faster on Frontier (read 209 s vs ~3 h).

Alcauchy and others added 3 commits September 28, 2026 15:29
The restart reader opened the BP file on MPI_COMM_SELF, so every rank
independently parsed the full global metadata instead of a single
rank-0 read + broadcast. Phase 1 also had every rank loop over all
g_ndomains reading each subdomain's extent/ncells via per-element
Mode::Sync Gets. Both costs scale ~O(N_ranks^2) and made restart reads
dominate wall time at large rank counts (~3 h at 65536 ranks vs a
2-3 min write).

- Open the reader on MPI_COMM_WORLD so ADIOS2 reads/broadcasts metadata
  collectively and can aggregate reads.
- In Phase 1, each rank now reads only its own subdomain entry and
  MPI_Allgathers the ncells/xmin/xmax arrays; global_extent and the
  reconstruction check are computed from the gathered layout. Non-MPI
  path unchanged.

Verified ~50x faster on Frontier (read 209 s vs ~3 h) in the sibling
entity_bh tree.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@haykh
haykh changed the base branch from master to 1.5.0rc October 5, 2026 15:39
@haykh
haykh merged commit 1fce041 into 1.5.0rc Oct 5, 2026
6 checks passed
@haykh
haykh deleted the chkpt_read_fix branch October 5, 2026 15:40
This was referenced Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants