jordan30001 / aparapi

Automatically exported from code.google.com/p/aparapi
Other
0 stars 0 forks source link

2D arrays management #152

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Execute the code attached

What is the expected output? What do you see instead?
The code attached shows that I am trying to manage several put/get in a loop to 
refresh/get-back data from GPU. It seems that the first put and get are done 
but not the others.
I don't think that it's a problem relative to GPU memory capacity (2GB memory 
in my case, and the application just put 2000*20*4 + 2000*4 = 168KB).
I'm using a CUDA architecture.
FYI, this program passes when running in JTP mode.
Moreover, the application thrown a SIGSEV when using implicit buffer management.

What version of the product are you using? On what operating system?
I am using the "Aparapi_2014_04_29_Linux64" version available in 
"svn/trunk/Downloads". Using a Debian distribution.

Please provide any additional information below.
I also referenced this problem in stackoverflow : 
http://stackoverflow.com/questions/25760691/aparapi-multiple-put-get-seems-to-ha
ve-no-effects

Original issue reported on code.google.com by gaetan.e...@gmail.com on 11 Sep 2014 at 3:15

Attachments:

GoogleCodeExporter commented 9 years ago
I forgot to mention that I am using JDK 1.8u20.

Original comment by gaetan.e...@gmail.com on 26 Nov 2014 at 8:34

GoogleCodeExporter commented 9 years ago
I have the same problem like you.

Aparapi ignores the put of an array.

But I think, if I say 

kernel.get(returnArray)
inArray=returnArray; //Swap the arrays
kernel.put(inArray);

Aparapi compare the Array ID and this is the same, so maybe the Set that used 
inside, ignores this array, because it’s “already” inside.

If I copy the ReturnArray or create a new one, its works fine, but now the 
MemoryManagement is useless because I need JavaCopy.

Original comment by oliver.h...@gmail.com on 4 Feb 2015 at 1:42