git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5294
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
*/
void SIMIX_create_environment(const char *file)
{
*/
void SIMIX_create_environment(const char *file)
{
xbt_dict_cursor_t cursor = NULL;
char *name = NULL;
void *workstation = NULL;
xbt_dict_cursor_t cursor = NULL;
char *name = NULL;
void *workstation = NULL;
surf_cpu_model_description[cpu_id].model_init(file);
surf_network_model_description[network_id].model_init(file);
surf_cpu_model_description[cpu_id].model_init(file);
surf_network_model_description[network_id].model_init(file);
- start = xbt_os_time();
- parse_platform_file(file);
- end = xbt_os_time();
- DEBUG1("PARSE TIME: %lg", (end-start));
- parsed = 1;
- }
surf_workstation_model_description[workstation_id].
surf_workstation_model_description[workstation_id].
- model_init(file);
-
- if (!parsed) {
- start = xbt_os_time();
- parse_platform_file(file);
- if (surf_workstation_model_description[workstation_id].create_ws != NULL)
- surf_workstation_model_description[workstation_id].create_ws();
- end = xbt_os_time();
- DEBUG1("PARSE TIME: %lg", (end-start));
- }
+ model_init(file);
+
+ start = xbt_os_time();
+ parse_platform_file(file);
+
+ if (surf_workstation_model_description[workstation_id].create_ws != NULL)
+ surf_workstation_model_description[workstation_id].create_ws();
+ end = xbt_os_time();
+ DEBUG1("PARSE TIME: %lg", (end-start));
_simix_init_status = 2; /* inited; don't change settings now */
_simix_init_status = 2; /* inited; don't change settings now */
s_surf_model_description_t surf_workstation_model_description[surf_workstation_model_description_size] = {
{"CLM03", NULL, surf_workstation_model_init_CLM03, create_workstations},
s_surf_model_description_t surf_workstation_model_description[surf_workstation_model_description_size] = {
{"CLM03", NULL, surf_workstation_model_init_CLM03, create_workstations},
- {"compound", NULL, surf_workstation_model_init_compound, NULL},
+ {"compound", NULL, surf_workstation_model_init_compound, create_workstations},
{"ptask_L07", NULL, surf_workstation_model_init_ptask_L07, NULL}
};
{"ptask_L07", NULL, surf_workstation_model_init_ptask_L07, NULL}
};
surf_workstation_model_init_internal();
surf_cpu_model_init_Cas01(filename);
surf_network_model_init_CM02(filename);
surf_workstation_model_init_internal();
surf_cpu_model_init_Cas01(filename);
surf_network_model_init_CM02(filename);
-// create_workstations();
update_model_description(surf_workstation_model_description,
surf_workstation_model_description_size,
"CLM03",
update_model_description(surf_workstation_model_description,
surf_workstation_model_description_size,
"CLM03",
xbt_assert0(surf_cpu_model, "No CPU model defined yet!");
xbt_assert0(surf_network_model, "No network model defined yet!");
surf_workstation_model_init_internal();
xbt_assert0(surf_cpu_model, "No CPU model defined yet!");
xbt_assert0(surf_network_model, "No network model defined yet!");
surf_workstation_model_init_internal();
update_model_description(surf_workstation_model_description,
surf_workstation_model_description_size,
update_model_description(surf_workstation_model_description,
surf_workstation_model_description_size,