- double runtime = parse_double(agget(dag_node,"size"));
- int performer = parse_int(agget(dag_node,"performer"));
- INFO3("See <job id=%s runtime=%s %.0f>",name,agget(dag_node,"size"),runtime);
- SD_task_t current_job = SD_task_create_comp_seq(name,(void*)performer,runtime);
- xbt_dict_set(jobs,name,current_job,NULL);
- xbt_dynar_push(result,¤t_job);
- Agedge_t *e;
- int count = 0;
- for (e = agfstin(dag_dot,dag_node); e; e = agnxtin(dag_dot,e)) {
- input_edge(current_job,e);
- count++;
- }
- if (count==0){
- SD_task_t file;
- char *name="root->many";
- double size = 0;
-
- file = xbt_dict_get_or_null(files,name);
- if (file==NULL) {
- file = SD_task_create_comm_e2e(name,NULL,size);
- xbt_dict_set(files,name,file,&dot_task_free);
- } else {
- if (SD_task_get_amount(file)!=size) {
- WARN3("Ignoring file %s size redefinition from %.0f to %.0f",
- name,SD_task_get_amount(file),size);
- }
- }
- SD_task_dependency_add(NULL,NULL,file,current_job);
- }
- count = 0;
- for (e = agfstout(dag_dot,dag_node); e; e = agnxtout(dag_dot,e)) {
- output_edge(current_job,e);
- count++;
- }
- if (count==0){
- SD_task_t file;
- char *name = "many->end";
- double size = 0;
-
- // INFO2("See <uses file=%s %s>",A_dot__uses_file,(is_input?"in":"out"));
- file = xbt_dict_get_or_null(files,name);
- if (file==NULL) {
- file = SD_task_create_comm_e2e(name,NULL,size);
- xbt_dict_set(files,name,file,&dot_task_free);
- } else {
- if (SD_task_get_amount(file)!=size) {
- WARN3("Ignoring file %s size redefinition from %.0f to %.0f",
- name,SD_task_get_amount(file),size);
- }
- }
- SD_task_dependency_add(NULL,NULL,current_job,file);
- if (xbt_dynar_length(file->tasks_before)>1) {
- WARN1("File %s created at more than one location...",file->name);
- }
- }
+ SD_task_t current_job;
+ double runtime = dot_parse_double(agget(dag_node, (char *) "size"));
+ long performer =
+ (long) dot_parse_int((char *) agget(dag_node, (char *) "performer"));
+ INFO3("See <job id=%s runtime=%s %.0f>", name,
+ agget(dag_node, (char *) "size"), runtime);
+ current_job = xbt_dict_get_or_null(jobs, name);
+ if (current_job == NULL) {
+ current_job =
+ SD_task_create_comp_seq(name, (void *) performer, runtime);
+#ifdef HAVE_TRACING
+ TRACE_sd_dotloader (current_job, agget (dag_node, (char*)"category"));
+#endif
+ xbt_dict_set(jobs, name, current_job, NULL);
+ xbt_dynar_push(result, ¤t_job);
+ }
+ Agedge_t *e;
+ int count = 0;
+ for (e = agfstin(dag_dot, dag_node); e; e = agnxtin(dag_dot, e)) {
+ dot_add_input_dependencies(current_job, e);
+ count++;
+ }
+ if (count == 0 && current_job != root_task) {
+ SD_task_dependency_add(NULL, NULL, root_task, current_job);
+ }
+ count = 0;
+ for (e = agfstout(dag_dot, dag_node); e; e = agnxtout(dag_dot, e)) {
+ dot_add_output_dependencies(current_job, e);
+ count++;
+ }
+ if (count == 0 && current_job != end_task) {
+ SD_task_dependency_add(NULL, NULL, current_job, end_task);
+ }