return value;
}
-static int dax_parse_int(const char *string)
-{
- int ret = 0;
- int value;
-
- ret = sscanf(string, "%d", &value);
- if (ret != 1)
- dax_parse_error(bprintf("%s is not an integer", string));
- return value;
-}
-
/* Ensure that transfer tasks have unique names even though a file is used
* several times */
static SD_task_t current_job;
static SD_task_t root_task, end_task;
-static void dump_res()
-{
- unsigned int cursor;
- SD_task_t task;
- xbt_dynar_foreach(result, cursor, task) {
- XBT_INFO("Task %u", cursor);
- SD_task_dump(task);
- }
-}
-
static void dax_task_free(void *task)
{
SD_task_t t = task;
xbt_dynar_foreach(result, cpt, file) {
if (SD_task_get_kind(file) == SD_TASK_COMM_E2E) {
uniq_transfer_task_name(file);
+ } else if (SD_task_get_kind(file) == SD_TASK_COMP_SEQ){
+ /* If some tasks do not take files as input, connect them to the root, if
+ * they don't produce files, connect them to the end node.
+ */
+ if ((file != root_task) && xbt_dynar_is_empty(file->tasks_before)) {
+ SD_task_dependency_add(NULL, NULL, root_task, file);
+ }
+ if ((file != end_task) && xbt_dynar_is_empty(file->tasks_after)) {
+ SD_task_dependency_add(NULL, NULL, file, end_task);
+ }
}
}