X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b036ace46e683594df67ee56d63cf009a7bc6f03..a89587facecc0a7ac72c72243fedf75638374d2a:/src/simdag/sd_daxloader.c diff --git a/src/simdag/sd_daxloader.c b/src/simdag/sd_daxloader.c index 29803e9f75..287cb9cadf 100644 --- a/src/simdag/sd_daxloader.c +++ b/src/simdag/sd_daxloader.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010. The SimGrid Team. +/* Copyright (c) 2009-2013. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -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); + } } }