diff src/parallel_execution/TaskManagerImpl.cbc @ 317:51aa65676e37

CUDAtwice.cbc is called now
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 15 Feb 2017 16:28:25 +0900
parents 54d203daf06b
children a15511b1a6e0
line wrap: on
line diff
--- a/src/parallel_execution/TaskManagerImpl.cbc	Wed Feb 15 16:25:23 2017 +0900
+++ b/src/parallel_execution/TaskManagerImpl.cbc	Wed Feb 15 16:28:25 2017 +0900
@@ -22,8 +22,6 @@
     taskManagerImpl -> numWorker = taskManager->maxCPU;
     createWorkers(context, taskManager, taskManagerImpl);
     taskManager->taskManager = (union Data*)taskManagerImpl;
-printf ("create taskManagerImpl %p workers %p\n",taskManagerImpl, taskManagerImpl->workers);
-printf ("create taskManager %p\n",taskManager);
     return taskManager;
 }
 
@@ -38,10 +36,7 @@
 #ifdef USE_CUDAWorker
         Queue* queue = createSynchronizedQueue(context);
         // taskManagerImpl->workers[i] = (Worker*)createCUDAWorker(context, i, queue,0);
-printf("createWorkers q %p\n", queue );
         taskManagerImpl->workers[i] = (Worker*)queue;
-printf("createWorkers im %p\n", taskManagerImpl );
-printf ("createWorkers workers %p\n",taskManagerImpl->workers);
 #else
         Queue* queue = createSynchronizedQueue(context);
         taskManagerImpl->workers[i] = (Worker*)createCPUWorker(context, i, queue);
@@ -57,13 +52,10 @@
     TaskManager *t = (TaskManager *)taskManager->taskManager;
     TaskManagerImpl *im = (TaskManagerImpl *)t->taskManager;
 
-printf ("createTask im %p 1 worker %p q %p \n",im, im->workers, im->workers[0]->tasks);
-
     taskManager->context = NEW(struct Context);
     initContext(taskManager->context);
     taskManager->context->taskManager = taskManager;
     struct Queue* tasks = im->workers[0]->tasks;
-printf ("createTask  q %p\n",tasks);
     goto meta(context, C_setWorker);
 }
 
@@ -81,7 +73,6 @@
 }
 
 __code spawnTaskManager(struct TaskManagerImpl* taskManager, struct Queue* queue, struct Context* task, __code next(...)) {
-printf ("2 %p\n",taskManager->workers[0]->tasks);
     if (task->idgCount == 0) {
         // enqueue activeQueue
         queue->queue = (union Data*)taskManager->activeQueue;
@@ -96,7 +87,6 @@
 
 __code spawnTaskManager_stub(struct Context* context) {
     TaskManagerImpl* taskManager = (TaskManagerImpl*)GearImpl(context, TaskManager, taskManager);
-printf ("3 %p\n",taskManager->workers[0]->tasks);
     pthread_mutex_lock(&taskManager->mutex);
     goto spawnTaskManager(context,
                           taskManager,
@@ -126,7 +116,6 @@
 __code taskSend1(struct TaskManagerImpl* taskManager, struct Queue* queue, struct Context* task, __code next(...)) {
     struct Queue* tasks = taskManager->workers[task->workerId]->tasks;
     queue->queue = (union Data*)tasks;
-printf("taskSend1 workerid %d %p workers %p q %p \n" , task->workerId, taskManager,  taskManager->workers, queue->queue);
     queue->data = (union Data*)task;
     queue->next = next;
     goto meta(context, tasks->put);