I guess that previously, the patterns were replaced for the first
host, and then reused as is for the next ones. So the traces specified
for the first host were used for any ones.
if (strcmp(struct_cluster->availability_trace, "")) {
xbt_dict_set(patterns, "radical", bprintf("%d", i), xbt_free);
char *tmp_availability_file =
if (strcmp(struct_cluster->availability_trace, "")) {
xbt_dict_set(patterns, "radical", bprintf("%d", i), xbt_free);
char *tmp_availability_file =
- xbt_strdup(struct_cluster->availability_trace);
- xbt_str_varsubst(tmp_availability_file, patterns);
+ xbt_str_varsubst(struct_cluster->availability_trace, patterns);
XBT_DEBUG("\tavailability_file=\"%s\"", tmp_availability_file);
host.power_trace = tmgr_trace_new(tmp_availability_file);
xbt_free(tmp_availability_file);
XBT_DEBUG("\tavailability_file=\"%s\"", tmp_availability_file);
host.power_trace = tmgr_trace_new(tmp_availability_file);
xbt_free(tmp_availability_file);
XBT_DEBUG("\tavailability_file=\"\"");
}
if (strcmp(struct_cluster->state_trace, "")) {
XBT_DEBUG("\tavailability_file=\"\"");
}
if (strcmp(struct_cluster->state_trace, "")) {
- char *tmp_state_file = xbt_strdup(struct_cluster->state_trace);
- xbt_str_varsubst(tmp_state_file, patterns);
+ char *tmp_state_file =
+ xbt_str_varsubst(struct_cluster->state_trace, patterns);
XBT_DEBUG("\tstate_file=\"%s\"", tmp_state_file);
host.state_trace = tmgr_trace_new(tmp_state_file);
xbt_free(tmp_state_file);
XBT_DEBUG("\tstate_file=\"%s\"", tmp_state_file);
host.state_trace = tmgr_trace_new(tmp_state_file);
xbt_free(tmp_state_file);