Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a warning if the DAX file contains loop dependencies in the data flow
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 4 May 2010 10:25:29 +0000 (10:25 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 4 May 2010 10:25:29 +0000 (10:25 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7670 48e7efb5-ca39-0410-a469-dd3cf9ba447f

ChangeLog
src/simdag/sd_daxloader.c

index 84f2cdd..1ecbd13 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 SimGrid (3.4.1-svn) unstable; urgency=low
 
 SimGrid (3.4.1-svn) unstable; urgency=low
 
+ SimDag
+ * Warn the user about loop dependencies in data flow of DAX files
+
  Java Bindings
  * Fix a bug preventing the tasks from begin garbage collected.
 
  Java Bindings
  * Fix a bug preventing the tasks from begin garbage collected.
 
index f1a270e..6a523ea 100644 (file)
@@ -84,7 +84,7 @@ xbt_dynar_t SD_daxload(const char*filename) {
   fclose(in_file);
 
   /* And now, post-process the files.
   fclose(in_file);
 
   /* And now, post-process the files.
-   * We want a file task per pair of computation tasks exchanging the file. Dupplicate on need
+   * We want a file task per pair of computation tasks exchanging the file. Duplicate on need
    * Files not produced in the system are said to be produced by root task (top of DAG).
    * Files not consumed in the system are said to be consumed by end task (bottom of DAG).
    */
    * Files not produced in the system are said to be produced by root task (top of DAG).
    * Files not consumed in the system are said to be consumed by end task (bottom of DAG).
    */
@@ -111,6 +111,10 @@ xbt_dynar_t SD_daxload(const char*filename) {
     } else {
       xbt_dynar_foreach(file->tasks_before,cpt1,depbefore) {
         xbt_dynar_foreach(file->tasks_after,cpt2,depafter) {
     } 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);
+          }
           SD_task_t newfile = SD_task_create_comm_e2e(file->name,NULL,file->amount);
           SD_task_dependency_add(NULL,NULL,depbefore->src,newfile);
           SD_task_dependency_add(NULL,NULL,newfile,depafter->dst);
           SD_task_t newfile = SD_task_create_comm_e2e(file->name,NULL,file->amount);
           SD_task_dependency_add(NULL,NULL,depbefore->src,newfile);
           SD_task_dependency_add(NULL,NULL,newfile,depafter->dst);