Hi everyone, 

I am trying to do some overlapping/synchronization of communication and 
computation from within the follower iterator for arrays in the CyclicDist 
module (albeit a version that I've modified). I have three main 
"tasks/jobs/pieces of code" that I'd like to overlap/synchronize. Let's call 
them get, yield, and put.

Get is responsible for retrieving a buffer of elements from a nonlocal locale. 
Yield is yielding each element in the buffer. Put is writing back these 
elements to the locale they belong to. These "tasks/jobs" are running in a 
serial loop within the follower iterator. 

I'd like to overlap these "tasks/jobs" so that the get call for the second 
buffer can start while the first buffer is yielding and putting back. A 
simplified way to envision this might be:

Get1Yield1Put1
Get2Yield2Put2
Get3Yield3Put3
.
.
.

To do this, I would like to create separate Chapel tasks from within the 
follower iterator for get and put using "begin", and provide synchronization 
using sync variables to block certain tasks from executing before others 
finish. These "tasks/jobs" aren't doing any yielding so it should be safe to do 
within the follower iterator. However, I get the following error when creating 
new tasks within a follower iterator:

error: invalid use of parallel construct within serial iterator

Can any of you recommend a way around this so I can accomplish this 
overlapping/synchronization? Thanks.
 

Aroon Sharma
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to