Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fixed bug in route:multi generation; appeared after the KCC.. model was eliminated
[simgrid.git] / src / surf / surf.c
index fe4348c..a87fa27 100644 (file)
@@ -152,10 +152,9 @@ s_surf_model_description_t surf_cpu_model_description[] = {
 
 int surf_workstation_model_description_size = 4;
 s_surf_model_description_t surf_workstation_model_description[] = {
-  {"CLM03", NULL, surf_workstation_model_init_CLM03},
-  {"KCCFLN05", NULL, surf_workstation_model_init_KCCFLN05},
-  {"compound", NULL, surf_workstation_model_init_compound},
-  {"ptask_L07", NULL, surf_workstation_model_init_ptask_L07}
+  {"CLM03", NULL, surf_workstation_model_init_CLM03, create_workstations},
+  {"compound", NULL, surf_workstation_model_init_compound, NULL},
+  {"ptask_L07", NULL, surf_workstation_model_init_ptask_L07, NULL}
 };
 
 void update_model_description(s_surf_model_description_t * table,
@@ -379,7 +378,11 @@ FILE *surf_fopen(const char *name, const char *mode)
        path_name_len = strlen(path) + strlen(name) + 1;        /* plus '/' */
        path_name = xbt_realloc(path_name, path_name_len + 1);
       }
+      #ifdef WIN32
+      sprintf(path_name, "%s\\%s", path, name);
+      #else
       sprintf(path_name, "%s/%s", path, name);
+      #endif
       file = fopen(path_name, mode);
       if (file)
        return file;
@@ -418,6 +421,7 @@ void surf_exit(void)
     path_name = NULL;
   }
   surf_parse_free_callbacks();
+  xbt_dict_free(&route_table);
   NOW=0; /* Just in case the user plans to restart the simulation afterward */
   xbt_exit();
 }