Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[simdag/dotloader,example/simdag/dot] correction of the warning at the
[simgrid.git] / examples / simdag / dot / dot_test.c
index 319be24..3edb40d 100644 (file)
@@ -25,8 +25,6 @@ int main(int argc, char **argv)
   /* initialisation of SD */
   SD_init(&argc, argv);
 
-  TRACE_start ();
-
   /* Check our arguments */
   if (argc < 3) {
     INFO1("Usage: %s platform_file dot_file [trace_file]", argv[0]);
@@ -50,6 +48,10 @@ int main(int argc, char **argv)
 
   /* load the DOT file */
   dot = SD_dotload(argv[2]);
+  if(dot == NULL){
+    INFO0("No dot load may be you have a cycle in your graph");
+    return -1;
+  }
 
   /* Display all the tasks */
   INFO0
@@ -124,7 +126,5 @@ int main(int argc, char **argv)
 
   /* exit */
   SD_exit();
-
-  TRACE_end();
   return 0;
 }