How should I correctly use hpx::distributed::barrier
to synchronize tasks across all nodes
#6547
Unanswered
phil-skillwon
asked this question in
Q&A
Replies: 2 comments 3 replies
-
@hkaiser |
Beta Was this translation helpful? Give feedback.
2 replies
-
Well, some minimal C++ code would suffice. The overall environment is not required. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I created an action that is a compute-intensive task, taking about 1-7 seconds to execute. I will execute this action 8 times across 2 nodes simultaneously and use
hpx::distributed::barrier
for synchronization across these tasks. I referred to the documentation forhpx::distributed::barrier
:https://hpx-docs.stellar-group.org/latest/html/libs/full/collectives/api/barrier.html?highlight=barrier#hpx-distributed-barrier
Here is part of my test code:
My question is:
Why do any of the following lines cause
barr.wait()
in themyTask
function to block indefinitely?While these lines allow
barr.wait()
to return:I thought this line should also allow
barr.wait()
to return, but it doesn't synchronize tasks across nodes correctly in my test:auto barr = hpx::distributed::barrier(DISTR_BARRIER_URL, NUM_TASKS, locId);
Only these three lines work for cross-node synchronization:
How should I correctly use
hpx::distributed::barrier
to synchronize tasks across all nodes?Beta Was this translation helpful? Give feedback.
All reactions