Syncleus / aparapi

The New Official Aparapi: a framework for executing native Java and Scala code on the GPU.
http://aparapi.com
Apache License 2.0
465 stars 59 forks source link

Debugging errors #159

Closed Pascal66 closed 4 years ago

Pascal66 commented 4 years ago

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

Pascal66 commented 4 years ago

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 ?

Pascal66 commented 4 years ago

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