Skip to content
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

Creating sketches for stencilmark tests fails #2

Open
sdorkenw opened this issue Nov 22, 2016 · 1 comment
Open

Creating sketches for stencilmark tests fails #2

sdorkenw opened this issue Nov 22, 2016 · 1 comment
Assignees

Comments

@sdorkenw
Copy link
Contributor

Hi,
I built the frontend with make on a 32bit Ubuntu 14.04 setup (same as in the Dockerfile) and used it to get *.ir files with make stencil in the stencilmark_fortran folder. Then, I tried to use the provided docker image for the backend in the stng/backend directory to create the sketch file, but it fails with

[INFO]: Generating sketch level 11 from IR file: stencil_stencilmark/heat_loop0.ir
[INFO]: Sketch file: sketch/heat_loop0.sk
Traceback (most recent call last):
File "./stng-backend.py", line 139, in <module>
  gen_sketch(args)
File "./stng-backend.py", line 32, in gen_sketch
  sketch = whichGenerator(program, inputs, loopvars).generate()
File "/home/sdorkenw/stng/backend/generate_sketch.py", line 221, in generate
  ret += self.generate_generators()
File "/home/sdorkenw/stng/backend/generate_sketch.py", line 739, in generate_generators
  interpreter_result = interpret.Interpreter(inputs, outputs).interpret(self.program)
File "/home/sdorkenw/stng/backend/interpret.py", line 68, in interpret
  self.visit(tree)
File "/usr/lib/python2.7/ast.py", line 241, in visit
  return visitor(node)
File "/home/sdorkenw/stng/backend/interpret.py", line 107, in visit_Block
  map(self.visit, node.body)
File "/usr/lib/python2.7/ast.py", line 241, in visit
  return visitor(node)
File "/home/sdorkenw/stng/backend/interpret.py", line 112, in visit_WhileLoop
  self.visit(node.body)
File "/usr/lib/python2.7/ast.py", line 241, in visit
  return visitor(node)
File "/home/sdorkenw/stng/backend/interpret.py", line 107, in visit_Block
  map(self.visit, node.body)
File "/usr/lib/python2.7/ast.py", line 241, in visit
  return visitor(node)
File "/home/sdorkenw/stng/backend/interpret.py", line 112, in visit_WhileLoop
  self.visit(node.body)
File "/usr/lib/python2.7/ast.py", line 241, in visit
  return visitor(node)
File "/home/sdorkenw/stng/backend/interpret.py", line 107, in visit_Block
  map(self.visit, node.body)
File "/usr/lib/python2.7/ast.py", line 241, in visit
  return visitor(node)
File "/home/sdorkenw/stng/backend/interpret.py", line 112, in visit_WhileLoop
  self.visit(node.body)
File "/usr/lib/python2.7/ast.py", line 241, in visit
  return visitor(node)
File "/home/sdorkenw/stng/backend/interpret.py", line 107, in visit_Block
  map(self.visit, node.body)
File "/usr/lib/python2.7/ast.py", line 241, in visit
  return visitor(node)
File "/home/sdorkenw/stng/backend/interpret.py", line 119, in visit_AssignExp
  self.state[node.lval.name.name][self.visit(node.lval.loc)+AOFFSET] = self.visit(node.rval)
File "/usr/lib/python2.7/ast.py", line 241, in visit
  return visitor(node)
File "/home/sdorkenw/stng/backend/interpret.py", line 103, in visit_BinExp
  ret = sympy.sympify("(("+str(self.visit(node.left))+")" + node.op +"("+str(self.visit(node.right))+"))")
File "/usr/lib/python2.7/ast.py", line 241, in visit
  return visitor(node)
File "/home/sdorkenw/stng/backend/interpret.py", line 90, in visit_ArrExp
  return self.state[node.name.name][loc+AOFFSET]
IndexError: list index out of range

This is however working for the CloverLeaf_Serial tests that I tried so far (eg. accelerate_kernel_loop82.ir).

@shoaibkamil
Copy link
Contributor

shoaibkamil commented Nov 22, 2016

Let me look into this. I believe it's an issue of allocating a large enough array size in the interpreter. Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants