xbt_dynar_t SD_dotload_generic(const char * filename)
{
- xbt_assert0(filename, "Unable to use a null file descriptor\n");
- dag_dot = agopen((char*)filename,Agstrictdirected,0);
+ xbt_assert(filename, "Unable to use a null file descriptor\n");
+//dag_dot = agopen((char*)filename,Agstrictdirected,0);
+ FILE *in_file = fopen(filename, "r");
+ dag_dot = agread(in_file, NIL(Agdisc_t *));
result = xbt_dynar_new(sizeof(SD_task_t), dot_task_free);
files = xbt_dict_new();
/* Free previous copy of the files */
xbt_dict_free(&files);
+ fclose(in_file);
if(acyclic_graph_detail(result))
return result;
acyclic_graph_detail(result);
computer = xbt_dynar_new(sizeof(SD_task_t), NULL);
xbt_dict_set(computers, char_performer, computer, NULL);
}
- if(performer < sd_global->workstation_count){
+ if(performer < host_lib->count){
// the wanted computer is available
SD_task_t *task_test = NULL;
if(order < computer->used)