Hello,

I finally found my issue. The distance_to method for the row_iterator was false and this is this method which is used in the for_loop function.

Loic


Le 26/04/2022 à 18:11, Loic Gouarin a écrit :

Hello,

I develop a project for adaptive mesh refeinement techniques on cartesian grid called samurai (https://github.com/hpc-maths/samurai). This is a new data structure for this kind of topic based on interval and set algebra.

This software is not yet parallelized and I try to see if HPX could be a good candidate for that. I have some experience xith MPI but I want to try task based software.

So first, I want to test HPX on a 2d finite difference scheme using a 5 points stencil. I saw the tutorial made in 2019 and I try to replicate it. I have created the iterators for the row and the line and I have a working example using a classical for loop with an interator on the rows.

But, when I want to replace this for loop by hpx::for_loop, it seems that the test to see if the iterator is at the end of the loop is never tested: which means that the equal method defined in my iterator using iterator_facade is never called. I made something like that:

iteratorcurr(nx, U[0].begin());
hpx::for_loop(hpx::execution::seq,
curr, curr +ny - 1,
[&curr](autoit)
{
std::cout <<*it.middle<<std::endl;
std::cout <<std::endl;
}
);

The iterator it moves correctly. But the equal method is not called. I can put the code on a gist if you prefer.

Do you know what I'm doing wrong ?

Thanks,

Loic



_______________________________________________
hpx-users mailing list
hpx-users@stellar-group.org
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
_______________________________________________
hpx-users mailing list
hpx-users@stellar-group.org
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users

Reply via email to