Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
correctly use clumsy xbt_dynar interface
[simgrid.git] / examples / simdag / dag-dotload / sd_dag-dotload.c
index 24d94fe..176bd08 100644 (file)
@@ -33,14 +33,13 @@ int main(int argc, char **argv)
   dot = SD_dotload(argv[2]);
   if(dot == NULL){
     XBT_CRITICAL("No dot loaded. Do you have a cycle in your graph?");
-    SD_exit();
     exit(2);
   }
 
   char *tracefilename;
   char *last = strrchr(argv[2], '.');
   tracefilename = bprintf("%.*s.trace", (int) (last == NULL ? strlen(argv[2]) : last - argv[2]),argv[2]);
-  if (argc == 4) 
+  if (argc == 4)
     tracefilename = xbt_strdup(argv[3]);
 
   /* Display all the tasks */
@@ -73,8 +72,7 @@ int main(int argc, char **argv)
   xbt_free(hosts);
 
   XBT_INFO("------------------- Run the schedule ---------------------------");
-  xbt_dynar_t changed_tasks = SD_simulate(-1);
-  xbt_dynar_free(&changed_tasks);
+  SD_simulate(-1);
 
   XBT_INFO("------------------- Produce the trace file---------------------------");
   XBT_INFO("Producing the trace of the run into %s", basename(tracefilename));
@@ -105,6 +103,5 @@ int main(int argc, char **argv)
   fclose(out);
 
   /* exit */
-  SD_exit();
   return 0;
 }