git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5094
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
surf_workstation_model_description[workstation_id].
model_init(file);
surf_workstation_model_description[workstation_id].
model_init(file);
- double s = xbt_os_time();
- if (!parsed) parse_platform_file(file);
- double e = xbt_os_time();
- DEBUG1("PARSE TIME: %lg", (e-s));
+ if (!parsed) {
+ double s = xbt_os_time();
+ parse_platform_file(file);
+ double e = xbt_os_time();
+ DEBUG1("PARSE TIME: %lg", (e-s));
+ }
_simix_init_status = 2; /* inited; don't change settings now */
_simix_init_status = 2; /* inited; don't change settings now */
int link_list_capacity = 0;
link_CM02_t *link_list = NULL;
xbt_dict_cursor_t cursor = NULL;
int link_list_capacity = 0;
link_CM02_t *link_list = NULL;
xbt_dict_cursor_t cursor = NULL;
const char *sep = "#";
xbt_dynar_t links, keys;
const char *sep = "#";
xbt_dynar_t links, keys;
link_list_capacity = xbt_dynar_length(links);
link_list = xbt_new(link_CM02_t, link_list_capacity);
link_list_capacity = xbt_dynar_length(links);
link_list = xbt_new(link_CM02_t, link_list_capacity);
- src_id = atoi(xbt_dynar_get_as(keys, 0, char*));
- dst_id = atoi(xbt_dynar_get_as(keys, 1, char*));
+ src_id = strtol(xbt_dynar_get_as(keys, 0, char*), &end, 16);
+ dst_id = strtol(xbt_dynar_get_as(keys, 1, char*), &end, 16);
char* link = NULL;
xbt_dynar_foreach (links, cpt, link) {
char* link = NULL;
xbt_dynar_foreach (links, cpt, link) {
unsigned int cpt = 0;
int i = 0;
xbt_dict_cursor_t cursor = NULL;
unsigned int cpt = 0;
int i = 0;
xbt_dict_cursor_t cursor = NULL;
const char *sep = "#";
xbt_dynar_t links, keys;
const char *sep = "#";
xbt_dynar_t links, keys;
nb_link = xbt_dynar_length(links);
link_name = xbt_realloc(link_name, (nb_link) * sizeof(char *));
nb_link = xbt_dynar_length(links);
link_name = xbt_realloc(link_name, (nb_link) * sizeof(char *));
- src_id = atoi(xbt_dynar_get_as(keys, 0, char*));
- dst_id = atoi(xbt_dynar_get_as(keys, 1, char*));
+ src_id = strtol(xbt_dynar_get_as(keys, 0, char*), &end, 16);
+ dst_id = strtol(xbt_dynar_get_as(keys, 1, char*), &end, 16);
i = 0;
char* link = NULL;
i = 0;
char* link = NULL;
{
char* name;
if (src_id != -1 && dst_id != -1) {
{
char* name;
if (src_id != -1 && dst_id != -1) {
- name = bprintf("%d#%d#%lf#%lf#%lf#%lf",src_id, dst_id,impact_on_src,
+ name = bprintf("%x#%x#%lf#%lf#%lf#%lf",src_id, dst_id,impact_on_src,
impact_on_dst, impact_on_src_with_other_recv,
impact_on_dst_with_other_send);
impact_on_dst, impact_on_src_with_other_recv,
impact_on_dst_with_other_send);
int link_list_capacity = 0;
link_KCCFLN05_t *link_list = NULL;
xbt_dict_cursor_t cursor = NULL;
int link_list_capacity = 0;
link_KCCFLN05_t *link_list = NULL;
xbt_dict_cursor_t cursor = NULL;
const char *sep = "#";
xbt_dynar_t links, keys;
const char *sep = "#";
xbt_dynar_t links, keys;
link_list_capacity = xbt_dynar_length(links);
link_list = xbt_new(link_KCCFLN05_t, link_list_capacity);
link_list_capacity = xbt_dynar_length(links);
link_list = xbt_new(link_KCCFLN05_t, link_list_capacity);
- src_id = atoi(xbt_dynar_get_as(keys, 0, char*));
- dst_id = atoi(xbt_dynar_get_as(keys, 1, char*));
+ src_id = strtol(xbt_dynar_get_as(keys, 0, char*), &end, 16);
+ dst_id = strtol(xbt_dynar_get_as(keys, 1, char*), &end, 16);
impact_on_src = atof(xbt_dynar_get_as(keys, 2, char*));
impact_on_dst = atof(xbt_dynar_get_as(keys, 3, char*));
impact_on_src_with_other_recv = atof(xbt_dynar_get_as(keys, 4, char*));
impact_on_src = atof(xbt_dynar_get_as(keys, 2, char*));
impact_on_dst = atof(xbt_dynar_get_as(keys, 3, char*));
impact_on_src_with_other_recv = atof(xbt_dynar_get_as(keys, 4, char*));
int link_list_capacity = 0;
link_L07_t *link_list = NULL;
xbt_dict_cursor_t cursor = NULL;
int link_list_capacity = 0;
link_L07_t *link_list = NULL;
xbt_dict_cursor_t cursor = NULL;
const char *sep = "#";
xbt_dynar_t links, keys;
const char *sep = "#";
xbt_dynar_t links, keys;
links = (xbt_dynar_t)data;
keys = xbt_str_split_str(key, sep);
links = (xbt_dynar_t)data;
keys = xbt_str_split_str(key, sep);
- src_id = atoi(xbt_dynar_get_as(keys, 0, char*));
- dst_id = atoi(xbt_dynar_get_as(keys, 1, char*));
+ src_id = strtol(xbt_dynar_get_as(keys, 0, char*), &end, 16);
+ dst_id = strtol(xbt_dynar_get_as(keys, 1, char*), &end, 16);
link_list_capacity = xbt_dynar_length(links);
link_list = xbt_new(link_L07_t, link_list_capacity);
link_list_capacity = xbt_dynar_length(links);
link_list = xbt_new(link_L07_t, link_list_capacity);