Skip to content

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

@david8dixon

Description

@david8dixon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions