- } else {
- xbt_dynar_foreach(file->tasks_before, cpt1, depbefore) {
- xbt_dynar_foreach(file->tasks_after, cpt2, depafter) {
- if (depbefore->src == depafter->dst) {
- WARN2
- ("File %s is produced and consumed by task %s. This loop dependency will prevent the execution of the task.",
- file->name, depbefore->src->name);
+#ifdef HAVE_TRACING
+ TRACE_sd_dotloader (task, agget (node, (char*)"category"));
+#endif
+ xbt_dict_set(jobs, name, task, NULL);
+ if (!strcmp(name, "root")){
+ /* by design the root task is always SCHEDULABLE */
+ __SD_task_set_state(task, SD_SCHEDULABLE);
+ /* Put it at the beginning of the dynar */
+ xbt_dynar_insert_at(result, 0, &task);
+ } else {
+ if (!strcmp(name, "end")){
+ XBT_DEBUG("Declaration of the 'end' node, don't store it yet.");
+ end = task;
+ /* Should be inserted later in the dynar */
+ } else {
+ xbt_dynar_push(result, &task);
+ }
+ }
+
+ if((seq_or_par == sequential) &&
+ (schedule ||
+ XBT_LOG_ISENABLED(sd_dotparse, xbt_log_priority_verbose))){
+ /* try to take the information to schedule the task only if all is
+ * right*/
+ int performer, order;
+ char *char_performer, *char_order;
+ /* performer is the computer which execute the task */
+ performer =
+ (!strcmp((char_performer = agget(node, (char *) "performer")), "")?
+ -1:atoi(char_performer));
+ /* order is giving the task order on one computer */
+ order = (!strcmp((char_order = agget(node, (char *) "order")), "")?
+ -1:atoi(char_order));
+
+ XBT_DEBUG ("Task '%s' is scheduled on workstation '%d' in position '%d'",
+ task->name, performer, order);
+ xbt_dynar_t computer = NULL;
+ if(performer != -1 && order != -1){
+ /* required parameters are given */
+ computer = xbt_dict_get_or_null(computers, char_performer);
+ if(computer == NULL){
+ computer = xbt_dynar_new(sizeof(SD_task_t), NULL);
+ xbt_dict_set(computers, char_performer, computer, NULL);