-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: forall with filtering appears not to be parallel #26384
Comments
I'm curious: is it not parallel only when capturing the result into a new variable, or even when simply doing something standalone like I often wonder about just this case because (I believe) our current approach to capturing a filtered iterator expression into a new variable (*) is to do recursive doubling of the array as we compute it, and it's hard to imagine that proceeding in parallel. I'm guessing that's why this isn't parallelized. [Edit: Actually, as noted in #26385, even when the array is typed and we know its size, it's serialized because we can't anticipate how the filtered items will be numbered if we chunk of the iteration space in our normal way]. If the expression were written as Should it be parallelized in cases that can be? I think that sounds attractive, but it's not obvious to me what implementation we should use for efficiency and to maintain ordering. Do you have thoughts there? (* = or really, maybe, any iterable expression in which we can't compute the size a priori?) |
@jabraham17 and I had a conversation that was thematically similar to this issue today in which they wanted to capture the results of a parallel iterator into an array and didn't care about the order in which the results were captured into the array (motivated by today's day11 AoC problem). In the conversation, we discussed that a challenge in such cases is not only not knowing how many things will be yielded by the iterator, but also the array nature tending to require that ordering is preserved, by some definition. That led us to wonder whether initializing a data structure that did not have ordering as part of its key properties—such as an associative domain, set, or potentially associative array—should support |
Summary of Problem
Description:
I'm working on an algorithm that would benefit from a parallel filter. However with a quick check, it looks like this is not currently parallel at all. Should it be? Should it be warned about? What would it take to get it working, including with a distributed-memory
forall
?I'm talking about syntax like the spec describes
Is this issue currently blocking your progress?
no
Steps to Reproduce
Source Code:
I see best performance with
--dataParTasksPerLocale=1
.Compile command:
chpl --fast aa.chpl
Execution command:
Associated Future Test(s):
TODO
Configuration Information
2.3 pre-release on an Ubuntu PC.
The text was updated successfully, but these errors were encountered: