Syncleus / aparapi

The New Official Aparapi: a framework for executing native Java and Scala code on the GPU.

Home Page:http://aparapi.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Debugging errors

Pascal66 opened this issue · comments

Aparapi v2.0.0 Window Java 1.10
As we cant trycatch in kernel how to stacktrace an Arrayindexoutofbound error ?
Or look at the generated opencl file, wich i never found a way to see it.

janv. 27, 2020 10:25:10 AM com.aparapi.internal.kernel.KernelRunner fallBackToNextDevice
AVERTISSEMENT: Device failed for sieveK, devices={AMD|Java Alternative Algorithm|Java Thread Pool}: java.lang.ArrayIndexOutOfBoundsException: 0
com.aparapi.internal.exception.AparapiException: java.lang.ArrayIndexOutOfBoundsException: 0

I've found the first mistake I made : I'm using an external method from Kernel.
Now I've put this method inside the kernel, and I've a new error :

janv. 27, 2020 11:10:14 AM com.aparapi.internal.kernel.KernelRunner fallBackToNextDevice
AVERTISSEMENT: Device failed for sieveK, devices={AMD|Java Alternative Algorithm|Java Thread Pool}: Object array elements cannot contain
com.aparapi.internal.exception.ClassParseException: Object array elements cannot contain

But cannot contain what ?

Found my error, I'm using an exteral static variable