Skip to content

Broadcast tally results in chunks bounded by INT_MAX - #4125

Open
GuySten wants to merge 1 commit into
openmc-dev:developfrom
GuySten:claude/practical-edison-lslk91-bcast-chunks
Open

GuySten wants to merge 1 commit into
openmc-dev:developfrom
GuySten:claude/practical-edison-lslk91-bcast-chunks

Conversation

@GuySten

@GuySten GuySten commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Aggregating each filter bin into a contiguous datatype reduces the count passed to MPI_Bcast by a factor of the score and estimator dimensions, but the count is still an int. A tally with more filter bins than an int can represent therefore still fails, which is the part of #914 that remained open after the aggregation was introduced.

Broadcast in chunks no larger than INT_MAX filter bins, mirroring the approach already used for reductions in mpi::reduce_buffer. All ranks derive the loop bounds from the same tally layout, so the sequence of collective calls stays identical.

Fixes #914

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 18) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

Aggregating each filter bin into a contiguous datatype reduces the count
passed to MPI_Bcast by a factor of the score and estimator dimensions, but
the count is still an int. A tally with more filter bins than an int can
represent therefore still fails, which is the part of openmc-dev#914 that remained
open after the aggregation was introduced.

Broadcast in chunks no larger than INT_MAX filter bins, mirroring the
approach already used for reductions in mpi::reduce_buffer. All ranks
derive the loop bounds from the same tally layout, so the sequence of
collective calls stays identical across ranks.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ci4aodNXq5BPbv3PXZNcp
@GuySten
GuySten marked this pull request as ready for review September 11, 2026 22:58
@GuySten
GuySten requested a review from paulromano September 11, 2026 22:58
@GuySten GuySten added the Bugs label Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broadcasts potentially fail with large tallies

2 participants