Hi,
I am interested in using Delite and have just began studying it (I am a newbie). I have passed all the steps described in tutorial and installed Delite succesfully. Also I have tried running simple profiling DSL example which goes together with Delite sources. That try was succesfull as I got sensible result.
As the next step I tried to modify existing DSL. I have developed my new "empty" DSL containing neither new data structures nor new IR nodes, having existing ProfileDSL as an example. I was going to write simple applications on clear Scala using this DSL in order to look first how does Delite represent operations with collections, e.g. map. The code I was trying to execute was very simple:
val a = Array[Double](2.0, 10.0)
println(a(1))
val b = a map (x => x*3)
println(b(0))
Delite has compiled this code and produced number of Scala kernels and correspondent .deg file. But further executing code failed on one of the kernels.
=================================================================================================
TEST:
MyTestRunner$@7762965=================================================================================================
STAGING...
Delite Application Being Staged:[MyTestRunner$]
******Generating the program******
EXECUTING(scala:1)...
/home/afilippov/Delite/delite/generatedCache/scala/src/kernels/x8.scala:6: error: not found: value x7
val out = x7
^
one error found
/home/afilippov/Delite/delite/generatedCache/scala/src/kernels/x8.scala:6: error: not found: value x7
val out = x7
Correspondent x8.scala code is:
package generated.scala
object kernel_x8 {
def apply(x1:Array[Double]): Array[Double] = {
// workaround for refinedManifest problem
val x8 = {
val out = x7
val in = x1
var i = 0
while (i < in.length) {
val x4 = in(i)
val x5 = x4 * 3.0
out(i) = x5
i += 1
}
out
}
x8
}}
As we see here, x7 value is really declared nowhere.
This case could be easily reproduced on existing ProfileTest example. I just tried to run it with the same code (simple mapping and printing, could be found above) preliminarily added to the very begining of main function. And got the same result: executing failed with the same diagnostics.
Probably, I am doing something wrong but do not know what exactly. Could you please point me on my mistakes? Or, may be, this is a bug in framework I have accidentally discovered.
Thank you in advance,
Alexander Filippov