Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This is better for regex ... sorry
[simgrid.git] / examples / simdag / sd_typed_tasks_test.c
index 9e9933a..248c4d4 100644 (file)
@@ -44,10 +44,6 @@ int main(int argc, char **argv)
  
   workstations = SD_workstation_get_list();
 
-  for (i=0;i<SD_workstation_get_number();i++)
-    XBT_INFO("%s runs at %f flops", SD_workstation_get_name(workstations[i]),
-       SD_workstation_get_power(workstations[i]));
-
   /* creation of some typed tasks and their dependencies */
   seq_comp1 = SD_task_create_comp_seq("Seq. comp. 1", NULL, 1e9);
   e2e_comm = SD_task_create_comm_e2e("E2E comm.", NULL, 1e7);
@@ -70,6 +66,16 @@ int main(int argc, char **argv)
   SD_task_schedulev(par_comp1, 4, workstations);
   SD_task_schedulev(par_comp2, 3, workstations);
 
+  /* Let's unschedule these tasks and test the auto-scheduling in the
+   * opposite way.
+   */
+  SD_task_unschedule(par_comp1);
+  SD_task_unschedule(par_comp2);
+  SD_task_unschedule(redist); /* yes, it was scheduled too */
+
+  SD_task_schedulev(par_comp2, 3, workstations);
+  SD_task_schedulev(par_comp1, 4, workstations);
+
   for (i=0;i<4;i++){
     workstation_list[i]=workstations[i+4];
     /* Apply Amdahl's law manually assuming a 20% serial part */