summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1efa42b)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5111
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
void *workstation = NULL;
char *workstation_model_name;
int workstation_id = -1;
void *workstation = NULL;
char *workstation_model_name;
int workstation_id = -1;
simix_config_init(); /* make sure that our configuration set is created */
surf_timer_model_init(file);
simix_config_init(); /* make sure that our configuration set is created */
surf_timer_model_init(file);
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);
- double start = xbt_os_time();
parse_platform_file(file);
parse_platform_file(file);
- double end = xbt_os_time();
DEBUG1("PARSE TIME: %lg", (end-start));
parsed = 1;
}
DEBUG1("PARSE TIME: %lg", (end-start));
parsed = 1;
}
model_init(file);
if (!parsed) {
model_init(file);
if (!parsed) {
double s = xbt_os_time();
parse_platform_file(file);
double s = xbt_os_time();
parse_platform_file(file);
- double e = xbt_os_time();
DEBUG1("PARSE TIME: %lg", (e-s));
}
DEBUG1("PARSE TIME: %lg", (e-s));
}
if (routing_table == NULL) create_routing_table();
xbt_dict_foreach(route_table, cursor, key, data) {
if (routing_table == NULL) create_routing_table();
xbt_dict_foreach(route_table, cursor, key, data) {
nb_link = 0;
links = (xbt_dynar_t)data;
keys = xbt_str_split_str(key, sep);
nb_link = 0;
links = (xbt_dynar_t)data;
keys = xbt_str_split_str(key, sep);
src_id = strtol(xbt_dynar_get_as(keys, 0, char*), &end, 16);
dst_id = strtol(xbt_dynar_get_as(keys, 1, char*), &end, 16);
src_id = strtol(xbt_dynar_get_as(keys, 0, char*), &end, 16);
dst_id = strtol(xbt_dynar_get_as(keys, 1, char*), &end, 16);
xbt_dynar_foreach (links, cpt, link) {
TRY {
link_list[nb_link++] = xbt_dict_get(link_set, link);
xbt_dynar_foreach (links, cpt, link) {
TRY {
link_list[nb_link++] = xbt_dict_get(link_set, link);
char *id, *suffix, *prefix, *radical;
int start, end;
xbt_dynar_t radical_ends;
char *id, *suffix, *prefix, *radical;
int start, end;
xbt_dynar_t radical_ends;
+ xbt_dynar_t current_set;
+ char *value;
+ int i;
id = xbt_strdup(A_surfxml_set_id);
prefix = xbt_strdup(A_surfxml_set_prefix);
id = xbt_strdup(A_surfxml_set_id);
prefix = xbt_strdup(A_surfxml_set_prefix);
surf_parse_get_int(&start, xbt_dynar_get_as(radical_ends, 0, char*));
surf_parse_get_int(&end, xbt_dynar_get_as(radical_ends, 1, char*));
surf_parse_get_int(&start, xbt_dynar_get_as(radical_ends, 0, char*));
surf_parse_get_int(&end, xbt_dynar_get_as(radical_ends, 1, char*));
- xbt_dynar_t current_set = xbt_dynar_new(sizeof(char*), NULL);
+ current_set = xbt_dynar_new(sizeof(char*), NULL);
for (i=start; i<end; i++) {
value = bprintf("%s%d%s", prefix, i, suffix);
xbt_dynar_push(current_set, &value);
for (i=start; i<end; i++) {
value = bprintf("%s%d%s", prefix, i, suffix);
xbt_dynar_push(current_set, &value);
xbt_dynar_t names = NULL;
unsigned int cpt = 0;
char *name;
xbt_dynar_t names = NULL;
unsigned int cpt = 0;
char *name;
+ const char* surfxml_host_power;
+ const char* surfxml_host_availability;
+ const char* surfxml_host_availability_file;
+ const char* surfxml_host_state_file;
+ const char* surfxml_host_interference_send;
+ const char* surfxml_host_interference_recv;
+ const char *surfxml_host_interference_send_recv;
+ const char* surfxml_host_max_outgoing_rate;
xbt_assert1((names = xbt_dict_get_or_null(set_list, foreach_set_name)),
"Set name '%s' reffered by foreach tag not found.", foreach_set_name);
xbt_assert1((strcmp(A_surfxml_host_id, "$1") == 0), "The id of the host within the foreach should point to the foreach set_id (use $1). Your value: %s", A_surfxml_host_id);
xbt_assert1((names = xbt_dict_get_or_null(set_list, foreach_set_name)),
"Set name '%s' reffered by foreach tag not found.", foreach_set_name);
xbt_assert1((strcmp(A_surfxml_host_id, "$1") == 0), "The id of the host within the foreach should point to the foreach set_id (use $1). Your value: %s", A_surfxml_host_id);
- const char* surfxml_host_power = A_surfxml_host_power;
- const char* surfxml_host_availability = A_surfxml_host_availability;
- const char* surfxml_host_availability_file = A_surfxml_host_availability_file;
- const char* surfxml_host_state_file = A_surfxml_host_state_file;
- const char* surfxml_host_interference_send = A_surfxml_host_interference_send;
- const char* surfxml_host_interference_recv = A_surfxml_host_interference_recv;
- const char *surfxml_host_interference_send_recv = A_surfxml_host_interference_send_recv;
- const char* surfxml_host_max_outgoing_rate = A_surfxml_host_max_outgoing_rate;
+ surfxml_host_power = A_surfxml_host_power;
+ surfxml_host_availability = A_surfxml_host_availability;
+ surfxml_host_availability_file = A_surfxml_host_availability_file;
+ surfxml_host_state_file = A_surfxml_host_state_file;
+ surfxml_host_interference_send = A_surfxml_host_interference_send;
+ surfxml_host_interference_recv = A_surfxml_host_interference_recv;
+ surfxml_host_interference_send_recv = A_surfxml_host_interference_send_recv;
+ surfxml_host_max_outgoing_rate = A_surfxml_host_max_outgoing_rate;
/* foreach name in set call the main host callback */
xbt_dynar_foreach (names, cpt, name) {
/* foreach name in set call the main host callback */
xbt_dynar_foreach (names, cpt, name) {
xbt_dynar_t names = NULL;
unsigned int cpt = 0;
char *name;
xbt_dynar_t names = NULL;
unsigned int cpt = 0;
char *name;
+ const char* surfxml_link_bandwidth;
+ const char* surfxml_link_bandwidth_file;
+ const char* surfxml_link_latency;
+ const char* surfxml_link_latency_file;
+ const char* surfxml_link_state_file;
xbt_assert1((names = xbt_dict_get_or_null(set_list, foreach_set_name)),
"Set name '%s' reffered by foreach tag not found.", foreach_set_name);
xbt_assert1((strcmp(A_surfxml_link_id, "$1") == 0), "The id of the link within the foreach should point to the foreach set_id (use $1). Your value: %s", A_surfxml_link_id);
xbt_assert1((names = xbt_dict_get_or_null(set_list, foreach_set_name)),
"Set name '%s' reffered by foreach tag not found.", foreach_set_name);
xbt_assert1((strcmp(A_surfxml_link_id, "$1") == 0), "The id of the link within the foreach should point to the foreach set_id (use $1). Your value: %s", A_surfxml_link_id);
- const char* surfxml_link_bandwidth = A_surfxml_link_bandwidth;
- const char* surfxml_link_bandwidth_file = A_surfxml_link_bandwidth_file;
- const char* surfxml_link_latency = A_surfxml_link_latency;
- const char* surfxml_link_latency_file = A_surfxml_link_latency_file;
- const char* surfxml_link_state_file = A_surfxml_link_state_file;
+ surfxml_link_bandwidth = A_surfxml_link_bandwidth;
+ surfxml_link_bandwidth_file = A_surfxml_link_bandwidth_file;
+ surfxml_link_latency = A_surfxml_link_latency;
+ surfxml_link_latency_file = A_surfxml_link_latency_file;
+ surfxml_link_state_file = A_surfxml_link_state_file;
/* for each name in set call the main link callback */
xbt_dynar_foreach (names, cpt, name) {
parse_change_link_data(name, surfxml_link_bandwidth, surfxml_link_bandwidth_file,
/* for each name in set call the main link callback */
xbt_dynar_foreach (names, cpt, name) {
parse_change_link_data(name, surfxml_link_bandwidth, surfxml_link_bandwidth_file,
char* cluster_bb_lat = A_surfxml_cluster_bb_lat;
char* saved_buff = surfxml_bufferstack;
char* cluster_bb_lat = A_surfxml_cluster_bb_lat;
char* saved_buff = surfxml_bufferstack;
+
+ char * backbone_name;
+
surfxml_bufferstack = xbt_new0(char, surfxml_bufferstack_size);
/* Make set */
surfxml_bufferstack = xbt_new0(char, surfxml_bufferstack_size);
/* Make set */
SURFXML_END_TAG(foreach);
/* Make backbone link */
SURFXML_END_TAG(foreach);
/* Make backbone link */
- char * backbone_name = bprintf("%s_bb", cluster_id);
+ backbone_name = bprintf("%s_bb", cluster_id);
parse_change_link_data(backbone_name, cluster_bb_bw, "", cluster_bb_lat, "", "");
A_surfxml_link_state = A_surfxml_link_state_ON;
A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FATPIPE;
parse_change_link_data(backbone_name, cluster_bb_bw, "", cluster_bb_lat, "", "");
A_surfxml_link_state = A_surfxml_link_state_ON;
A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FATPIPE;
void parse_trace_c_connect(void)
{
void parse_trace_c_connect(void)
{
xbt_assert1(xbt_dict_get_or_null(traces_set_list, A_surfxml_trace_c_connect_trace_id),
"Trace %s undefined", A_surfxml_trace_c_connect_trace_id);
xbt_assert1(xbt_dict_get_or_null(traces_set_list, A_surfxml_trace_c_connect_trace_id),
"Trace %s undefined", A_surfxml_trace_c_connect_trace_id);
- char* trace_connect = bprintf("%s#%d#%d#%s", A_surfxml_trace_c_connect_trace_id, A_surfxml_trace_c_connect_element,
+ trace_connect = bprintf("%s#%d#%d#%s", A_surfxml_trace_c_connect_trace_id, A_surfxml_trace_c_connect_element,
A_surfxml_trace_c_connect_kind, A_surfxml_trace_c_connect_connector_id);
xbt_dynar_push(traces_connect_list, &trace_connect);
}
A_surfxml_trace_c_connect_kind, A_surfxml_trace_c_connect_connector_id);
xbt_dynar_push(traces_connect_list, &trace_connect);
}
int linecount = 0;
s_tmgr_event_t event;
tmgr_event_t last_event = NULL;
int linecount = 0;
s_tmgr_event_t event;
tmgr_event_t last_event = NULL;
+ xbt_dynar_t list;
+ unsigned int cpt;
+ char * val;
if (trace_list) {
trace = xbt_dict_get_or_null(trace_list, id);
if (trace_list) {
trace = xbt_dict_get_or_null(trace_list, id);
trace = xbt_new0(s_tmgr_trace_t, 1);
trace->event_list = xbt_dynar_new(sizeof(s_tmgr_event_t), NULL);
trace = xbt_new0(s_tmgr_trace_t, 1);
trace->event_list = xbt_dynar_new(sizeof(s_tmgr_event_t), NULL);
- xbt_dynar_t list = xbt_str_split(input,"\n\r");
+ list = xbt_str_split(input,"\n\r");
+
- unsigned int cpt;
- char * val;
xbt_dynar_foreach(list, cpt, val) {
linecount++;
xbt_str_trim(val, " \t\n\r\x0B");
xbt_dynar_foreach(list, cpt, val) {
linecount++;
xbt_str_trim(val, " \t\n\r\x0B");
char *key,*data, *end;
const char *sep = "#";
xbt_dynar_t links, keys;
char *key,*data, *end;
const char *sep = "#";
xbt_dynar_t links, keys;
if (routing_table == NULL) create_routing_table();
if (routing_table == NULL) create_routing_table();
impact_on_src_with_other_recv = 0;//atof(xbt_dynar_get_as(keys, 4, char*));
impact_on_dst_with_other_send = 0;//atof(xbt_dynar_get_as(keys, 5, char*));
impact_on_src_with_other_recv = 0;//atof(xbt_dynar_get_as(keys, 4, char*));
impact_on_dst_with_other_send = 0;//atof(xbt_dynar_get_as(keys, 5, char*));
xbt_dynar_foreach (links, cpt, link) {
TRY {
link_list[nb_link++] = xbt_dict_get(link_set, link);
xbt_dynar_foreach (links, cpt, link) {
TRY {
link_list[nb_link++] = xbt_dict_get(link_set, link);
char *key,*data, *end;
const char *sep = "#";
xbt_dynar_t links, keys;
char *key,*data, *end;
const char *sep = "#";
xbt_dynar_t links, keys;
if (routing_table == NULL) create_routing_table();
if (routing_table == NULL) create_routing_table();
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);
xbt_dynar_foreach (links, cpt, link) {
TRY {
link_list[nb_link++] = xbt_dict_get(link_set, link);
xbt_dynar_foreach (links, cpt, link) {
TRY {
link_list[nb_link++] = xbt_dict_get(link_set, link);