From: suter Date: Thu, 6 Jun 2013 20:31:42 +0000 (+0200) Subject: allow tasks to take no output nor produce any output X-Git-Tag: v3_9_90~316 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/777ab1d984a7f99783e0a9dd18b4f52358900ee8 allow tasks to take no output nor produce any output --- diff --git a/src/simdag/sd_daxloader.c b/src/simdag/sd_daxloader.c index 29803e9f75..1ef9172bc2 100644 --- a/src/simdag/sd_daxloader.c +++ b/src/simdag/sd_daxloader.c @@ -361,6 +361,16 @@ xbt_dynar_t SD_daxload(const char *filename) 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); + } } }