All,

Basically I am asking for information on how to use hpx::find_locality. I
am trying to write a simple program that runs an action on a random
locality and then terminates. This seems to be simple but I am not getting
this code to work. This is a small program to test what I want:

#include <hpx/hpx_main.hpp>
#include <hpx/include/iostreams.hpp>

void sayhello(){
    hpx::cout << "hello\n";
}

HPX_PLAIN_ACTION(sayhello,sayhello_action);

int main(){
    
hpx::async<sayhello_action>(hpx::find_locality(sayhello_action::get_component_type()));
    return 0;
}


The previous code compiles however I get this error:

my_hpx_program: /usr/local/include/boost/smart_ptr/intrusive_ptr.hpp:193:
T& boost::intrusive_ptr<T>::operator*() const [with T =
hpx::naming::detail::id_type_impl]: Assertion `px != 0' failed.

This tells me that maybe I need to register or instantiate a component
implementing the plain action somewhere. However I cannot find any code,
documentation or reference to the use of hpx::find_locality .Changing to
hpx::find_here works normally which makes it more confusing to me.

Thanks.

Gleiry Agustin
_______________________________________________
hpx-users mailing list
[email protected]
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users

Reply via email to