GithubHelp home page GithubHelp logo

stellar-group / tutorials Goto Github PK

View Code? Open in Web Editor NEW
33.0 26.0 13.0 15.75 MB

This repository contains material for HPX tutorials given by members of the STE||AR-Group

HTML 33.92% CSS 0.92% TeX 64.29% Shell 0.87%
hpx

tutorials's Introduction

tutorials's People

Contributors

biddisco avatar hkaiser avatar ignition avatar msimberg avatar rstobaugh avatar severinstrobl avatar sithhell avatar tapaswenipathak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tutorials's Issues

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

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.

lbl2016/2.pptx typo on slide 8

In: tutorials/lbl2016/HPX Workshop (Berkeley C++ Summit) - 2.pptx
on slide 8
Missing variable name pt.

packaged_task<F> (func);
auto f = pt.get_future();

Failed to run CUDA examples

Hi, I built HPX with CUDA with the following CMake command:

cmake -GNinja -DHPX_WITH_CUDA=ON -DCMAKE_INSTALL_PREFIX=/path/to/hpx/install -DHPX_WITH_MALLOC=system -DHPX_WITH_CXX2A=ON -DHPX_WITH_MAX_CPU_COUNT=8 -DHPX_WITH_APEX=TRUE -DAPEX_WITH_OTF2=TRUE -DOTF2_ROOT=/path/to/otf2/install -DAPEX_WITH_CUDA=TRUE .. && ninja install

I wasn't able to build any of the CUDA examples. For example when compiling (https://github.com/STEllAR-GROUP/tutorials/blob/master/examples/00_exercises/solution9.cpp), I get the following error:

../solution9.cpp: In function ‘int main()’:
../solution9.cpp:16:42: error: ‘cuda’ in namespace ‘hpx::compute’ does not name a type
     using allocator_type = hpx::compute::cuda::default_allocator;
                                          ^~~~
../solution9.cpp:17:41: error: ‘cuda’ in namespace ‘hpx::compute’ does not name a type
     using executor_type = hpx::compute::cuda::default_executor;
                                         ^~~~
../solution9.cpp:28:19: error: ‘hpx::compute::cuda’ has not been declared
     hpx::compute::cuda::target device;
                   ^~~~
../solution9.cpp:31:5: error: ‘allocator_type’ was not declared in this scope
     allocator_type alloc(device);
     ^~~~~~~~~~~~~~
../solution9.cpp:31:5: note: suggested alternative: ‘fallocate’
     allocator_type alloc(device);
     ^~~~~~~~~~~~~~
     fallocate
../solution9.cpp:32:5: error: ‘executor_type’ was not declared in this scope
     executor_type exec(device);
     ^~~~~~~~~~~~~
../solution9.cpp:41:48: error: type/value mismatch at argument 2 in template parameter list for ‘template<class T, class Allocator> class hpx::compute::vector’
     hpx::compute::vector<double, allocator_type> c(1000000, 2.0, alloc);
                                                ^
../solution9.cpp:41:48: note:   expected a type, got ‘allocator_type’
../solution9.cpp:41:66: error: ‘alloc’ was not declared in this scope
     hpx::compute::vector<double, allocator_type> c(1000000, 2.0, alloc);
                                                                  ^~~~~
../solution9.cpp:41:66: note: suggested alternative: ‘valloc’
     hpx::compute::vector<double, allocator_type> c(1000000, 2.0, alloc);
                                                                  ^~~~~
                                                                  valloc
../solution9.cpp:41:71: error: expression list treated as compound expression in initializer [-fpermissive]
     hpx::compute::vector<double, allocator_type> c(1000000, 2.0, alloc);
                                                                       ^
../solution9.cpp:44:60: error: ‘exec’ was not declared in this scope
     hpx::parallel::reduce(hpx::parallel::execution::par.on(exec), std::begin(v),
                                                            ^~~~
../solution9.cpp:44:60: note: suggested alternative: ‘rexec’
     hpx::parallel::reduce(hpx::parallel::execution::par.on(exec), std::begin(v),
                                                            ^~~~
                                                            rexec
../solution9.cpp:44:78: error: ‘v’ was not declared in this scope
     hpx::parallel::reduce(hpx::parallel::execution::par.on(exec), std::begin(v),
                                                                              ^
ninja: build stopped: subcommand failed.

I modified the code to reflect current HPX changes (like hpx::compute::cuda::default_allocator to hpx::cuda::experimental::default_allocator) but I kept gettiing error: ‘cuda’ is not a member of ‘hpx’.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.