Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
update entry on the distributed scheduling of DAGs
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 18 Jan 2006 16:00:05 +0000 (16:00 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 18 Jan 2006 16:00:05 +0000 (16:00 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1898 48e7efb5-ca39-0410-a469-dd3cf9ba447f

doc/FAQ.doc

index a3e2951..96d4ba9 100644 (file)
@@ -462,8 +462,28 @@ decisions, there is no way to handle DAGs directly anymore (unless I am
 missing something). You have to encode your DAGs in term of communicating
 process to make the whole scheduling process distributed. Believe me, it is
 worth the effort since you'll then be able to try your algorithms in a very
 missing something). You have to encode your DAGs in term of communicating
 process to make the whole scheduling process distributed. Believe me, it is
 worth the effort since you'll then be able to try your algorithms in a very
-wide variety of conditions.
+wide variety of conditions. Here is an example of how you could do that.
+Assume T1 has to be done before T2.
 
 
+\verbatim
+ int your_agent(int argc, char *argv[] {
+   ...
+   T1 = MSG_task_create(...);
+   T2 = MSG_task_create(...);
+   ...
+   while(1) {
+     ...
+     if(cond) MSG_task_execute(T1);
+     ...
+     if((MSG_task_get_remaining_computation(T1)=0.0) && (you_re_in_a_good_mood))
+        MSG_task_execute(T2)
+     else {
+        /* do something else */
+     }
+   }
+ }
+\endverbatim
 If you decide that the distributed part is not that much important and that
 DAG is really the level of abstraction you want to work with (but it
 prevents you from having "realistic" platform modeling), then you should
 If you decide that the distributed part is not that much important and that
 DAG is really the level of abstraction you want to work with (but it
 prevents you from having "realistic" platform modeling), then you should