ironted / aparapi

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

failed to transfer data using explicit data transfers #113

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I'm trying to use explicit transfers using put() and get() methods.
I have a large run() method on wich i use a global variable to emulate multiple 
entrypoints, so my code looks like:

put(result);

Range range1 = Range.create(..,..);
option = ENTRY_1;
execute(range);

Range range2 = Range.create2(..,..,..,..);
option = ENTRY_2;
execute(range);

get(result);

When i use the version provided in the trunk, each run of the program returns 
different results, and each thread modifies an unique position of the result, 
so it's not about the race conditions...

I tried to use the aparapi-2012-05-06 version, but it seems that it only works 
when i access the data between executions, i mean:

execute(range);

//bucle for printing results[]

Range range2 = Range.create2(..,..,..,..);
option = ENTRY_2;
execute(range);

this works, but the extrange thing is that i don't even use get(result) before 
printing, so i guess this is a problem related to handling explicit transfers.
I tried to sleep the proccess instead of printing, but it didn't work, neither 
a get(result) and put(result) between execute() calls.

What version of the product are you using? On what operating system?
trunk and 2012-05-06 in unix centOs 6.4
Kernel       : 2.6.32-358.6.2.el6.x86_64

Please provide any additional information below.

Host specifications:
2 × Intel Xeon E5-2660 Sandy Bridge @2.2 GHz
NVIDIA Tesla Kepler K20m 5 GB GDDR5

Original issue reported on code.google.com by jdocampo...@gmail.com on 31 May 2013 at 5:36

GoogleCodeExporter commented 8 years ago
Maybe that needs another private array for in-thread to get results then a 
"put/get" method for out-thread communication. Can be slow also.

Original comment by huseyin....@gmail.com on 1 Jun 2013 at 9:00

GoogleCodeExporter commented 8 years ago
Can you provide a more specific example? I've been using explicit transfers in 
both the pre-compiled and latest trunk versions without issue.

Original comment by paul.mi...@gmail.com on 12 Jun 2013 at 1:16