Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
renaming value of presence state to "presence" (to get a good time-slice value later on)
[simgrid.git] / examples / msg / gtnets / gtnets.c
index 8e6c295..a702f7d 100644 (file)
@@ -73,13 +73,15 @@ int master(int argc, char *argv[])
   /* time measurement */
   start_time = MSG_get_clock();
   MSG_task_send(todo, id_alias);
-
   end_time = MSG_get_clock();
-  INFO3("Send completed (to %s). Transfer time: %f\t Agregate bandwidth: %f",
-        slave->name, (end_time - start_time),
-        task_comm_size / (end_time - start_time));
-  INFO2("Completed peer: %s time: %f", slave->name, (end_time - start_time));
 
+
+  if (!bool_printed) {
+    INFO3("Send completed (to %s). Transfer time: %f\t Agregate bandwidth: %f",
+         slave->name, (end_time - start_time),
+         task_comm_size / (end_time - start_time));
+    INFO2("Completed peer: %s time: %f", slave->name, (end_time - start_time));
+  }
   return 0;
 }                               /* end_of_master */
 
@@ -126,17 +128,9 @@ int slave(int argc, char *argv[])
            slavenames[id], remaining);
       }
     }
-    //exit(0);
-  }
-
-  for (id = 0; id < NTASKS; id++) {
-    if (gl_task_array[id] == task) {
-      MSG_task_destroy(task);
-      gl_task_array[id] = NULL;
-      return 0;
-    }
-  }
+  }  
 
+  MSG_task_destroy(task);
   return 0;
 }                               /* end_of_slave */