Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
less printfs, more proper debug
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 22 Mar 2010 10:09:37 +0000 (10:09 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 22 Mar 2010 10:09:37 +0000 (10:09 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7291 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/msg/masterslave/masterslave_mailbox.c

index 4bdd10f..382f78d 100644 (file)
@@ -29,8 +29,7 @@ int master(int argc, char *argv[])
 
   int i;
 
 
   int i;
 
-  printf("Got %ld slaves and %ld tasks to process\n", slaves_count,number_of_tasks);
-//  INFO2("Got %ld slaves and %ld tasks to process", slaves_count,number_of_tasks);
+  INFO2("Got %ld slaves and %ld tasks to process", slaves_count,number_of_tasks);
 
   for (i = 0; i < number_of_tasks; i++) {
     char mailbox[256];
 
   for (i = 0; i < number_of_tasks; i++) {
     char mailbox[256];
@@ -40,13 +39,10 @@ int master(int argc, char *argv[])
     sprintf(mailbox,"slave-%ld",i % slaves_count);
     sprintf(sprintf_buffer, "Task_%d", i);
     task = MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, NULL);
     sprintf(mailbox,"slave-%ld",i % slaves_count);
     sprintf(sprintf_buffer, "Task_%d", i);
     task = MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, NULL);
-    if (number_of_tasks<10000 || i%10000 == 0) {         
-      printf("Sending \"%s\" (of %ld) to mailbox \"%s\"\n", task->name, number_of_tasks, mailbox);
-      fflush(stdout);
-    }
+    if (number_of_tasks<10000 || i%10000 == 0) 
+      INFO3("Sending \"%s\" (of %ld) to mailbox \"%s\"", task->name, number_of_tasks, mailbox);
      
     MSG_task_send(task, mailbox);
      
     MSG_task_send(task, mailbox);
-   // INFO0("Sent");
   }
   
    INFO0("All tasks have been dispatched. Let's tell everybody the computation is over."); 
   }
   
    INFO0("All tasks have been dispatched. Let's tell everybody the computation is over.");