On 28 Aug 2009, at 8:29 PM, Josh Milthorpe wrote: > If I correctly understand the intent, you're trying to initialize > each element of S : Array[Complex] based on some values in the real > and image rails. However I don't think that's what the above code > achieves. > > The outer loop iterates over all places included in distS. The > inner loop iterates over every point in the region of S. Because > distS is a block distribution over all places, this means that an > activity will be started at each place, and each activity will > attempt to assign to every element of S - including those elements > that reside at other places. I suspect that this is the cause of > the BPE. > > (As an aside, S is not distributed, because distS is not used in the > initializer. To make it distributed, use > distS = Dist.makeBlock(distS,0); > rather than > distS = Dist.makeBlock(regionS,0); > ) > You could initialize S in a single statement using an Array > initializer function, something like: > > S = Array.make[Complex](distS, (val (i,j): Point) => new Complex > (real(i*Mc+j), image(i*Mc+j)));
This is what I was looking for but couldn't make it work. I don't know what I had before, but this works. Thanks! > > BTW is the use of "image" rather than "imaginary" an American vs. > British thing? I haven't heard this term used before. I'm porting a benchmark someone else wrote in C. I'm just using the same identifiers. Personally, I would have used "imag". Jim ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users