Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New XBT module: file
[simgrid.git] / examples / simdag / dot / dot_test2.c
index 4a5af63..47f327a 100644 (file)
@@ -1,6 +1,6 @@
 /* simple test trying to load a DOT file.                                   */
 
-/* Copyright (c) 2010. The SimGrid Team.
+/* Copyright (c) 2010-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -8,11 +8,10 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 #include "xbt/ex.h"
 #include <string.h>
-#define HAVE_JEDULE 0
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(test,
                              "Logging specific to this SimDag example");
@@ -23,7 +22,7 @@ int main(int argc, char **argv)
   unsigned int cursor;
   SD_task_t task, *dot_as_array=NULL;
 
-  /* initialisation of SD */
+  /* SD initialization */
   SD_init(&argc, argv);
 
   /* Check our arguments */
@@ -50,6 +49,10 @@ int main(int argc, char **argv)
       ("----------------------------- dump tasks again ------------------------------------");
   while ((task=dot_as_array[cursor++])){
     SD_task_dump(task);
+  }
+
+  cursor=0;
+  while ((task=dot_as_array[cursor++])){
     SD_task_destroy(task);
   }