Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[simdag/dot,example/simdag/dot] correction of logs
authorquintin <quintin@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 2 Dec 2010 10:48:01 +0000 (10:48 +0000)
committerquintin <quintin@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 2 Dec 2010 10:48:01 +0000 (10:48 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8869 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/simdag/dot/simulate_dot.c
src/simdag/sd_dotloader.c

index b45e8b4..ad2a6cb 100644 (file)
@@ -49,7 +49,7 @@ int main(int argc, char **argv)
   /* load the DOT file  and schedule tasks */
   dot = SD_dotload_with_sched(argv[2]);
   if(dot == NULL){
   /* load the DOT file  and schedule tasks */
   dot = SD_dotload_with_sched(argv[2]);
   if(dot == NULL){
-    INFO0("No dot load may be you have a cycle in your graph");
+    INFO0("The dot file with the provided scheduling is wrong, more information with the option : --log=sd_dotparse.thres:verbose");
     return -1;
   }
 
     return -1;
   }
 
index f62679a..6bd182c 100644 (file)
@@ -144,14 +144,14 @@ bool acyclic_graph_detection(xbt_dynar_t dag){
     if(task->kind == SD_TASK_COMM_E2E) continue;
     //test if all tasks are marked
     if(task->marked == 0){
     if(task->kind == SD_TASK_COMM_E2E) continue;
     //test if all tasks are marked
     if(task->marked == 0){
-      WARN1("test %s",task->name);
+      WARN1("the task %s is not marked",task->name);
       all_marked = false;
       break;
     }
   }
   task = NULL;
   if(!all_marked){
       all_marked = false;
       break;
     }
   }
   task = NULL;
   if(!all_marked){
-    DEBUG0("there are a cycle in your DAG");
+    VERB0("there is at least one cycle in your task graph");
   }
   return all_marked;
 }
   }
   return all_marked;
 }
@@ -230,9 +230,9 @@ xbt_dynar_t SD_dotload_with_sched(const char *filename){
     if(acyclic_graph_detection(result))
       return result;
     else
     if(acyclic_graph_detection(result))
       return result;
     else
-      WARN0("There are a cycle in your task graph");
+      WARN0("There is at least one cycle in the provided task graph");
   }else{
   }else{
-    WARN0("No scheduling provided");
+    WARN0("The scheduling is ignored");
   }
   return NULL;
 }
   }
   return NULL;
 }
@@ -376,7 +376,7 @@ void dot_add_task(Agnode_t * dag_node)
     SD_task_dependency_add(NULL, NULL, current_job, end_task);
   }
 
     SD_task_dependency_add(NULL, NULL, current_job, end_task);
   }
 
-  if(schedule){
+  if(schedule || XBT_LOG_ISENABLED(sd_dotparse, xbt_log_priority_verbose)){
     /* try to take the information to schedule the task only if all is
      * right*/
     // performer is the computer which execute the task
     /* try to take the information to schedule the task only if all is
      * right*/
     // performer is the computer which execute the task
@@ -407,8 +407,8 @@ void dot_add_task(Agnode_t * dag_node)
         if(task_test != NULL && *task_test != NULL && *task_test != current_job){
           /*the user gives the same order to several tasks*/
           schedule = false;
         if(task_test != NULL && *task_test != NULL && *task_test != current_job){
           /*the user gives the same order to several tasks*/
           schedule = false;
-          DEBUG0("scheduling does not take into account, several task has\
-                the same order");
+          VERB4("The task %s starts on the computer %s at the position : %s like the task %s",
+                 (*task_test)->name, char_performer, char_order, current_job->name);
         }else{
           //the parameter seems to be ok
           xbt_dynar_set_as(computer, order, SD_task_t, current_job);
         }else{
           //the parameter seems to be ok
           xbt_dynar_set_as(computer, order, SD_task_t, current_job);
@@ -417,17 +417,13 @@ void dot_add_task(Agnode_t * dag_node)
         /*the platform has not enough processors to schedule the DAG like
         *the user wants*/
         schedule = false;
         /*the platform has not enough processors to schedule the DAG like
         *the user wants*/
         schedule = false;
-        DEBUG0("scheduling does not take into account, not enough computers");
+        VERB0("The schedule is ignored, there are not enough computers");
       }
     }
       }
     }
-    else if((performer == -1 && order != -1) ||
-            (performer != -1 && order == -1)){
+    else {
       //one of necessary parameters are not given
       schedule = false;
       //one of necessary parameters are not given
       schedule = false;
-      DEBUG0("scheduling does not take into account");
-    } else {
-      //No schedule available
-      schedule = false;
+      VERB1("The schedule is ignored, the task %s is not correctly schedule", current_job->name);
     }
   }
 }
     }
   }
 }