]> AND Public Git Repository - simgrid.git/blobdiff - teshsuite/simdag/incomplete/incomplete.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SimDag Revolution: SD_workstation becomes sg_host
[simgrid.git] / teshsuite / simdag / incomplete / incomplete.c
index b82a105e866fbb7a7dfd8876284e932d128931db..d108d09033ab3ae599e30ab7839963a0ebe12831 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2012, 2014. The SimGrid Team.
+/* Copyright (c) 2007-2012, 2014-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(incomplete, sd, "SimDag incomplete test");
@@ -26,9 +26,8 @@ int main(int argc, char **argv)
 
   SD_task_t taskInit;
   SD_task_t taskA, taskB, taskC, taskD;
-  xbt_dynar_t ret;
 
-  const SD_workstation_t *workstation;
+  const sg_host_t *workstation;
 
   double communication_amount1 = 1e9;
   double no_cost = 0.0;
@@ -49,14 +48,14 @@ int main(int argc, char **argv)
 
   /* scheduling parameters */
 
-  workstation = SD_workstation_get_list();
+  workstation = sg_host_list();
 
   SD_task_dependency_add(NULL, NULL, taskInit, taskA);
   SD_task_dependency_add(NULL, NULL, taskInit, taskB);
   SD_task_dependency_add(NULL, NULL, taskC, taskD);
 
   /* let's launch the simulation! */
-  SD_task_schedule(taskInit, 1, SD_workstation_get_list(), &no_cost,
+  SD_task_schedule(taskInit, 1, sg_host_list(), &no_cost,
                    &no_cost, -1.0);
   SD_task_schedule(taskA, 1, &workstation[0], &no_cost,
                      &communication_amount1, -1.0);
@@ -64,8 +63,7 @@ int main(int argc, char **argv)
                      &communication_amount1, -1.0);
 
 
-  ret = SD_simulate(-1.);
-  xbt_dynar_free(&ret);
+  SD_simulate(-1.);
   SD_task_destroy(taskA);
   SD_task_destroy(taskB);
   SD_task_destroy(taskC);