Accéder au contenu.
Menu Sympa

starpu-devel - [Starpu-devel] Problem running CUDA task

Objet : Developers list for StarPU

Archives de la liste

[Starpu-devel] Problem running CUDA task


Chronologique Discussions 
  • From: Miguel Palhas <mpalhas@gmail.com>
  • To: starpu-devel@lists.gforge.inria.fr
  • Subject: [Starpu-devel] Problem running CUDA task
  • Date: Sun, 5 May 2013 23:43:08 +0100
  • List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel>
  • List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>

Greetings

I'm once again having problems, this time with the vector scaling sample provided in the docs

The problem is when the task is ran using a CUDA device. I've changed the codelet definition to only use STARPU_CUDA to better test this problem.

i'm doing everything like shown in the sample:

struct starpu_task *task = starpu_task_create
task->synchronous = 1;
task->cl = &cl;
task->handles[0] = vector_handle;
task->cl_arg = &factor;
task->cl_arg_size = sizeof(float);

starpu_task_submit(task);

starpu_data_unregister(vector_handle);
starpu_shutdown();

for(i = 0; i < NX; ++i) printf("%f\n", values[i]);


The problem is that 50% of the times i try this, the values array is printed unchanged at the end. This seems to be random, but somehow the data is not being synchronized after the CUDA kernel executes. What did i do wrong here? If required, i can provide the full source code i used

Also, another question: I tried, in order to fix this, to place a starpu_data_acquire(vector_handle, STARPU_R) right before the starpu_data_unregister call, but then the program hangs completely at that point. What is going on here?

--
Cumprimentos
Miguel Palhas



Archives gérées par MHonArc 2.6.19+.

Haut de le page