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

Cannot run tutorials/examples/00_exercises/solution8.cpp #5

Open
david8dixon opened this issue Jan 24, 2020 · 2 comments
Open

Cannot run tutorials/examples/00_exercises/solution8.cpp #5

david8dixon opened this issue Jan 24, 2020 · 2 comments

Comments

@david8dixon
Copy link

david8dixon commented Jan 24, 2020

I built hpx from master and when I try to compile:

https://github.com/STEllAR-GROUP/tutorials/blob/master/examples/00_exercises/solution8.cpp

It fails with:

undefined reference to `hpx::partitioned_vector_partition

so I did the following:

#include <hpx/hpx_main.hpp>
#include <hpx/include/parallel_reduce.hpp>
#include <hpx/include/partitioned_vector.hpp> //note that this changed

HPX_REGISTER_PARTITIONED_VECTOR(double);

int main()
{
  hpx::partitioned_vector<double> v(1000000, 1.0);
  hpx::parallel::reduce(hpx::parallel::execution::par, std::begin(v),
                        std::end(v), 0.0, std::plus<double>());

  return 0;
}

This compiles but when i run the executable, it segfaults.

@msimberg
Copy link
Collaborator

Sorry about the silence here, this fell away from my attention. I'll have a look at this in the next few days.

@msimberg
Copy link
Collaborator

Could please you post the full error message with the unchanged code? How you built HPX and the example (i.e. CMake options) may also be helpful.

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

No branches or pull requests

2 participants