Hi,
I've found this really nice library for stencils with ghost zones in the
Chapel release:
examples/benchmarks/miniMD/helpers/StencilDist.chpl
I've been trying to use it for some simple stencil
computation(non-periodic). It gives me the strange error during
updateFluff()
./StencilDist.chpl:1295: error: halt reached - array index out of
bounds: (-1, -1)
If anyone knows what kind of problem it is or can give some inkling to the
cause would be great.
Much help would be greatly appreciated.
Tuowen Zhao
PS: The code I used
use StencilDist;
const fluffWidth =(1,1);
config const n = 6, epsilon = 1.0e-5;
const BigSpace = {0..n+1,0..n+1};
const Space = {1..n, 1..n};
const D = BigSpace dmapped Stencil(boundingBox=Space,fluff=fluffWidth);
const RealD = Space dmapped Stencil(Space,fluff=fluffWidth);
const stencil = {(1,0),(-1,0),(0,1),(0,-1)};
const LastRow = RealD.exterior(1, 0);
var A, Temp : [D] real;
writeln(D);
var delta: real;
A[LastRow] = 1.0;
do {
forall pos in RealD do
Temp[pos] = (+ reduce [delta in stencil] A[delta+pos]) / 4;
delta = max reduce abs(A[RealD] - Temp[RealD]);
A[RealD]=Temp[RealD];
A.updateFluff();
} while (delta > epsilon);
writeln(A);
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users