Hi,

This issue was fixed in January by Brad:

https://github.com/chapel-lang/chapel/pull/3143

I confirmed that your program executes correctly on master. Fortunately it's a 
small fix, so it should be easy enough to modify in your local copy of Chapel 
if you would like to make progress. I'm the original author of StencilDist, so 
I'd be happy to answer any other questions you might have.

Good luck!

-Ben Harshbarger

From: Tuowen Zhao <[email protected]<mailto:[email protected]>>
Date: Wednesday, March 9, 2016 at 3:19 PM
To: 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Using the Stencil Library

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

Reply via email to