Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt broadcast() to non-unwrapping async<Action> #2887

Merged
merged 1 commit into from Sep 10, 2017
Merged

Conversation

hkaiser
Copy link
Member

@hkaiser hkaiser commented Sep 6, 2017

This fixes #2885

@hkaiser
Copy link
Member Author

hkaiser commented Sep 6, 2017

@zbyerly This should fix your issue, you will have to slightly change the code in libgeodecomp, though:

diff --git a/src/libgeodecomp/parallelization/hpxsimulator.cpp b/src/libgeodecomp/parallelization/hpxsimulator.cpp
index 04b974da..3a68fcf3 100644
--- a/src/libgeodecomp/parallelization/hpxsimulator.cpp
+++ b/src/libgeodecomp/parallelization/hpxsimulator.cpp
@@ -87,14 +87,16 @@ void gatherAndBroadcastLocalityIndices(
     }
 
     if (hpx::get_locality_id() == 0) {
-        std::vector<std::vector<double> > tempGlobalUpdateGroupSpeeds =
+        std::vector<hpx::future<std::vector<double> > > tempGlobalUpdateGroupSpeeds =
             hpx::lcos::broadcast<getUpdateGroupSpeeds_action>(localities, basename).get();
 
         std::vector<std::size_t> indices;
         std::vector<double> flattenedUpdateGroupSpeeds;
         std::size_t indexSum = 0;
 
-        for (auto&& vec: tempGlobalUpdateGroupSpeeds) {
+        for (auto&& vecf: tempGlobalUpdateGroupSpeeds) {
+            auto&& vec = vecf.get();
+
             for (auto&& weight: vec) {
                 flattenedUpdateGroupSpeeds << weight;
             }

@zbyerly
Copy link
Member

zbyerly commented Sep 7, 2017

This fixes the issue.

@zbyerly zbyerly mentioned this pull request Sep 7, 2017
@hkaiser hkaiser merged commit 31037f5 into master Sep 10, 2017
@hkaiser hkaiser deleted the fixing_2885 branch September 10, 2017 11:33
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.

regression in broadcast?
2 participants