Skip to content

Reimplement distributed::barrier on top of collectives infrastructure#7210

Merged
hkaiser merged 4 commits intoTheHPXProject:masterfrom
abhishek593:move-barrier
Apr 24, 2026
Merged

Reimplement distributed::barrier on top of collectives infrastructure#7210
hkaiser merged 4 commits intoTheHPXProject:masterfrom
abhishek593:move-barrier

Conversation

@abhishek593
Copy link
Copy Markdown
Contributor

Fixes #7203

Proposed Changes

Delete barrier_node LCO component. Barrier now stores a variant<monostate, communicator, hierarchical_communicator>. Small-N uses flat communicator; large-N uses hierarchical with 2k-1/2k generation mapping for reduce+broadcast phases. Global barriers always use flat path.

Test plan

  • barrier_test (64 threads × 64 iterations)
  • barrier_3792_test
  • barrier_hang_test
  • barrier_performance_test

@abhishek593 abhishek593 requested a review from hkaiser as a code owner April 20, 2026 22:03
@StellarBot
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 20, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Signed-off-by: Abhishek Bansal <abhibansal593@gmail.com>
Copy link
Copy Markdown
Contributor

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please:

  • complement the existing tests to exercise the hierarchical communicator use (similar to what's done for the other collectives)
  • compare the performance of the old and the new barrier?

Comment thread libs/full/collectives/include/hpx/collectives/barrier.hpp Outdated
Comment thread libs/full/collectives/include/hpx/collectives/barrier.hpp Outdated
Comment thread libs/full/collectives/include/hpx/collectives/barrier.hpp
Comment thread libs/full/collectives/include/hpx/collectives/barrier.hpp Outdated
Comment thread libs/full/collectives/include/hpx/collectives/barrier.hpp Fixed
Signed-off-by: Abhishek Bansal <abhibansal593@gmail.com>
Comment thread libs/full/collectives/include/hpx/collectives/barrier.hpp Outdated
Comment thread libs/full/init_runtime/src/pre_main.cpp
Signed-off-by: Abhishek Bansal <abhibansal593@gmail.com>
Comment thread libs/full/collectives/tests/performance/benchmark_collectives.cpp
Comment thread libs/full/collectives/include/hpx/collectives/barrier.hpp Outdated
Comment thread libs/full/collectives/include/hpx/collectives/barrier.hpp Fixed
Signed-off-by: Abhishek Bansal <abhibansal593@gmail.com>
Comment thread libs/full/collectives/include/hpx/collectives/barrier.hpp Dismissed
@abhishek593 abhishek593 requested a review from hkaiser April 23, 2026 23:36
Copy link
Copy Markdown
Contributor

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@hkaiser hkaiser added this to the 2.0.0 milestone Apr 24, 2026
@hkaiser hkaiser merged commit d7c9fe1 into TheHPXProject:master Apr 24, 2026
66 of 67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reimplement the distributed barrier on top of collectives infrastructure

4 participants