Chapel: Clarify the construction of parallel iterators

Created on 2 Feb 2018  路  6Comments  路  Source: chapel-lang/chapel

Looks like Parallel Iterators are pretty damn important. In trying to follow the tutorial, I got a bit lost. Now, it is most likely my fault, but here are some things that I was wondering.

  1. What is a tag? Why is it useful? What does it really do here? When I think "tag", I think of a way to index something for later. Like "tag this as inappropriate".
  2. What are the values and subsequent impacts of the iterKind enum?
  3. So a parallel iterator can be a leader OR a follower or does it have to be BOTH?
  4. It would be good to show the full code, it feels like the examples are broken up.

    1. In there, point to exactly where "leading" and "following" occurs

  5. I could not imagine how to abstract computeChunk into other problems.

My habit is to find a small chunk of code I can compile and run, then refer back to the docs to see where it breaks.

I don't want to be all negative. The colors on the page are really nice.

Thanks for your patience.

Docs Duplicate Feature Request user issue

All 6 comments

  1. I could not imagine how to abstract computeChunk into other problems.

On that note, this primer should probably be updated to use RangeChunk instead of a custom chunking function.

I think a big problem with the current parallel iterators primers is that it starts with leader-follower iterators (the complicated case) before going to standalone parallel iterators. This reflects the order in which the features were added to the language, and hence the primer. I think the more natural way to approach it would be to start with the standalone case (easier to understand, and arguably the common / simpler case) and then expand to leader-follower as an advanced topic "for those users who want to write parallel iterators that support zippering".

Can/should we close this as a duplicate of https://github.com/chapel-lang/chapel/issues/6343?

Probably, but I think @buddha314's feedback as a user should be taken into account when closing #6343

I cross-linked to this issue in my description of #6343 and am closing this one as a duplicate.

Or maybe Elliot is... (could've sworn I hit the close button... :) ).

Was this page helpful?
0 / 5 - 0 ratings