Browse Source

src/core/workers.c: add extra debug (and remove trailing whitespaces)

Nathalie Furmento 12 years ago
parent
commit
66161bfeb3
1 changed files with 10 additions and 3 deletions
  1. 10 3
      src/core/workers.c

+ 10 - 3
src/core/workers.c

@@ -76,7 +76,7 @@ static uint32_t _starpu_worker_exists_and_can_execute(struct starpu_task *task,
 		unsigned impl;
 		unsigned impl;
 		for (impl = 0; impl < STARPU_MAXIMPLEMENTATIONS; impl++)
 		for (impl = 0; impl < STARPU_MAXIMPLEMENTATIONS; impl++)
 		{
 		{
-			/* We could call task->cl->can_execute(i, task, impl) 
+			/* We could call task->cl->can_execute(i, task, impl)
 			   here, it would definitely work. It is probably
 			   here, it would definitely work. It is probably
 			   cheaper to check whether it is necessary in order to
 			   cheaper to check whether it is necessary in order to
 			   avoid a useless function call, though. */
 			   avoid a useless function call, though. */
@@ -1268,7 +1268,7 @@ int starpu_worker_get_nids_ctx_free_by_type(enum starpu_archtype type, int *work
 					struct starpu_sched_ctx_worker_collection *workers = config.sched_ctxs[s].workers;
 					struct starpu_sched_ctx_worker_collection *workers = config.sched_ctxs[s].workers;
 					if(workers->init_cursor)
 					if(workers->init_cursor)
 						workers->init_cursor(workers);
 						workers->init_cursor(workers);
-					
+
 					while(workers->has_next(workers))
 					while(workers->has_next(workers))
 					{
 					{
 						worker = workers->get_next(workers);
 						worker = workers->get_next(workers);
@@ -1278,7 +1278,7 @@ int starpu_worker_get_nids_ctx_free_by_type(enum starpu_archtype type, int *work
 							break;
 							break;
 						}
 						}
 					}
 					}
-					
+
 					if (workers->deinit_cursor)
 					if (workers->deinit_cursor)
 						workers->deinit_cursor(workers);
 						workers->deinit_cursor(workers);
 					if(found) break;
 					if(found) break;
@@ -1302,7 +1302,11 @@ int
 starpu_driver_run(struct starpu_driver *d)
 starpu_driver_run(struct starpu_driver *d)
 {
 {
 	if (!d)
 	if (!d)
+	{
+		_STARPU_DEBUG("Invalid argument\n");
 		return -EINVAL;
 		return -EINVAL;
+	}
+
 
 
 	switch (d->type)
 	switch (d->type)
 	{
 	{
@@ -1320,8 +1324,11 @@ starpu_driver_run(struct starpu_driver *d)
 #endif
 #endif
 	case STARPU_GORDON_WORKER: /* Not supported yet */
 	case STARPU_GORDON_WORKER: /* Not supported yet */
 	default:
 	default:
+	{
+		_STARPU_DEBUG("Invalid device type\n");
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
+	}
 }
 }
 
 
 int
 int