Browse Source

Make drivers push back a task through _starpu_push_task_to_workers instead of _starpu_push_task, so such tasks are not accounted twice for the nready counter

Samuel Thibault 12 years ago
parent
commit
bc1a386d12

+ 2 - 2
src/drivers/cpu/driver_cpu.c

@@ -243,7 +243,7 @@ int _starpu_cpu_driver_run_once(struct starpu_driver *d STARPU_ATTRIBUTE_UNUSED)
 	if (!_STARPU_CPU_MAY_PERFORM(j))
 	{
 		/* put it and the end of the queue ... XXX */
-		_starpu_push_task(j);
+		_starpu_push_task_to_workers(task);
 		return 0;
 	}
 
@@ -288,7 +288,7 @@ int _starpu_cpu_driver_run_once(struct starpu_driver *d STARPU_ATTRIBUTE_UNUSED)
 		switch (res)
 		{
 		case -EAGAIN:
-			_starpu_push_task(j);
+			_starpu_push_task_to_workers(task);
 			return 0;
 		default:
 			STARPU_ABORT();

+ 2 - 2
src/drivers/cuda/driver_cuda.c

@@ -454,7 +454,7 @@ int _starpu_cuda_driver_run_once(struct starpu_driver *d)
 	if (!_STARPU_CUDA_MAY_PERFORM(j))
 	{
 		/* this is neither a cuda or a cublas task */
-		_starpu_push_task(j);
+		_starpu_push_task_to_workers(task);
 		return 0;
 	}
 
@@ -472,7 +472,7 @@ int _starpu_cuda_driver_run_once(struct starpu_driver *d)
 		{
 			case -EAGAIN:
 				_STARPU_DISP("ouch, put the codelet %p back ... \n", j);
-				_starpu_push_task(j);
+				_starpu_push_task_to_workers(task);
 				STARPU_ABORT();
 			default:
 				STARPU_ABORT();

+ 2 - 2
src/drivers/gordon/driver_gordon.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010, 2011-2012  Université de Bordeaux 1
+ * Copyright (C) 2009-2013  Université de Bordeaux 1
  * Copyright (C) 2010, 2011, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
  *
@@ -422,7 +422,7 @@ void *gordon_worker_inject(struct _starpu_worker_set *arg)
 				}
 				else
 				{
-					_starpu_push_task(j);
+					_starpu_push_task_to_workers(task);
 				}
 			}
 #endif

+ 2 - 2
src/drivers/opencl/driver_opencl.c

@@ -680,7 +680,7 @@ int _starpu_opencl_driver_run_once(struct starpu_driver *d)
 	if (!_STARPU_OPENCL_MAY_PERFORM(j))
 	{
 		/* this is not a OpenCL task */
-		_starpu_push_task(j);
+		_starpu_push_task_to_workers(task);
 		return 0;
 	}
 
@@ -698,7 +698,7 @@ int _starpu_opencl_driver_run_once(struct starpu_driver *d)
 		{
 			case -EAGAIN:
 				_STARPU_DISP("ouch, put the codelet %p back ... \n", j);
-				_starpu_push_task(j);
+				_starpu_push_task_to_workers(task);
 				STARPU_ABORT();
 				return 0;
 			default: