SD_task_t parent, grand_parent;
xbt_dynar_t parents, grand_parents;
- int grand_parent_nworkstations;
SD_workstation_t *grand_parent_workstation_list;
parents = SD_task_get_parents(task);
}
xbt_dynar_get_cpy(grand_parents, 0, &grand_parent);
- grand_parent_nworkstations =
- SD_task_get_workstation_count(grand_parent);
grand_parent_workstation_list =
SD_task_get_workstation_list(grand_parent);
/* Estimate the redistribution time from this parent */
int main(int argc, char **argv)
{
- unsigned int cursor, selected_idx = 0;
+ unsigned int cursor;
double finish_time, min_finish_time = -1.0;
SD_task_t task, selected_task = NULL;
xbt_dynar_t ready_tasks;
min_finish_time = finish_time;
selected_task = task;
selected_workstation = workstation;
- selected_idx = cursor;
}
}
("------------------- Produce the trace file---------------------------");
XBT_INFO("Producing the trace of the run into %s", tracefilename);
out = fopen(tracefilename, "w");
- xbt_assert1(out, "Cannot write to %s", tracefilename);
+ xbt_assert(out, "Cannot write to %s", tracefilename);
free(tracefilename);
output_xml(out, dax);
xbt_dynar_foreach(dax, cursor, task) {
SD_task_destroy(task);
}
+ xbt_dynar_free_container(&dax);
for (cursor = 0; cursor < total_nworkstations; cursor++)
SD_workstation_free_attribute(workstations[cursor]);