Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added the update for the Df parameter (lmm_variable_t), which means the sum of all
authorvelho <velho@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 29 Jun 2007 09:20:13 +0000 (09:20 +0000)
committervelho <velho@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 29 Jun 2007 09:20:13 +0000 (09:20 +0000)
link latencies.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3609 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/Makefile.in
src/include/surf/maxmin.h
src/surf/maxmin.c
src/surf/maxmin_private.h
src/surf/workstation_KCCFLN05.c

index b62bebd..7e97eba 100644 (file)
@@ -382,11 +382,11 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
 FLEXML = @FLEXML@
 GRAMINE_MODE_FALSE = @GRAMINE_MODE_FALSE@
 GRAMINE_MODE_TRUE = @GRAMINE_MODE_TRUE@
 FLEXML = @FLEXML@
 GRAMINE_MODE_FALSE = @GRAMINE_MODE_FALSE@
 GRAMINE_MODE_TRUE = @GRAMINE_MODE_TRUE@
+GRAS_ARCH_32_BITS_FALSE = @GRAS_ARCH_32_BITS_FALSE@
+GRAS_ARCH_32_BITS_TRUE = @GRAS_ARCH_32_BITS_TRUE@
 GRAS_DEP = @GRAS_DEP@
 GREP = @GREP@
 GTNETS_CFLAGS = @GTNETS_CFLAGS@
 GRAS_DEP = @GRAS_DEP@
 GREP = @GREP@
 GTNETS_CFLAGS = @GTNETS_CFLAGS@
@@ -442,7 +442,6 @@ abs_top_srcdir = @abs_top_srcdir@
 ac_configure_args = @ac_configure_args@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_configure_args = @ac_configure_args@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
index 024807e..98c5f27 100644 (file)
@@ -61,6 +61,23 @@ void lmm_update(lmm_system_t sys, lmm_constraint_t cnst,
                lmm_variable_t var, double value);
 void lmm_update_variable_bound(lmm_system_t sys, lmm_variable_t var,
                               double bound);
                lmm_variable_t var, double value);
 void lmm_update_variable_bound(lmm_system_t sys, lmm_variable_t var,
                               double bound);
+
+/** \brief Add the value delta to var->df the sum of latencys.
+ * 
+ *  \param sys the lmm_system_t
+ *  \param var the lmm_variable_t
+ * 
+ *  Add the value delta to var->df (the sum of latencys associated to the
+ *  flow). Whenever this function is called a change is  signed in the system. To
+ *  avoid false system changing detection it is a good idea to test 
+ *  (delta != 0) before calling it.
+ *
+ */
+void lmm_update_variable_latency(lmm_system_t sys, lmm_variable_t var,
+                                double delta);
+
+
+
 XBT_PUBLIC(void) lmm_update_variable_weight(lmm_system_t sys, lmm_variable_t var,
                                double weight);
 double lmm_get_variable_weight(lmm_variable_t var);
 XBT_PUBLIC(void) lmm_update_variable_weight(lmm_system_t sys, lmm_variable_t var,
                                double weight);
 double lmm_get_variable_weight(lmm_variable_t var);
index 8dd3fb3..2131d8f 100644 (file)
@@ -173,6 +173,7 @@ lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id,
   var->weight = weight;
   var->bound = bound;
   var->value = 0.0;
   var->weight = weight;
   var->bound = bound;
   var->value = 0.0;
+  var->df    = 0.0;
   if(weight) xbt_swag_insert_at_head(var,&(sys->variable_set));
   else xbt_swag_insert_at_tail(var,&(sys->variable_set));
   XBT_OUT;
   if(weight) xbt_swag_insert_at_head(var,&(sys->variable_set));
   else xbt_swag_insert_at_tail(var,&(sys->variable_set));
   XBT_OUT;
@@ -533,6 +534,13 @@ void lmm_update_variable_bound(lmm_system_t sys, lmm_variable_t var,
   var->bound = bound;
 }
 
   var->bound = bound;
 }
 
+void lmm_update_variable_latency(lmm_system_t sys, lmm_variable_t var,
+                              double delta)
+{
+  sys->modified = 1;
+  var->df += delta;
+}
+
 void lmm_update_variable_weight(lmm_system_t sys, lmm_variable_t var,
                                double weight)
 {
 void lmm_update_variable_weight(lmm_system_t sys, lmm_variable_t var,
                                double weight)
 {
index 5e9e453..27c44d2 100644 (file)
@@ -57,11 +57,10 @@ typedef struct lmm_variable {
   double df; /* Total delay of flow */
   void *id;
   int index;
   double df; /* Total delay of flow */
   void *id;
   int index;
-  double (* func_f)    (struct lmm_variable *, double);  /* f            */
-  double (* func_fp)   (struct lmm_variable *, double);  /* f'           */
-  double (* func_fpi)  (struct lmm_variable *, double);  /* (f')^{-1}    */
-  double (* func_fpip) (struct lmm_variable *, double);  /* ((f')^{-1})' */
-  double func_fi;
+  double (* func_f)    (struct lmm_variable *var, double x);  /* f            */
+  double (* func_fp)   (struct lmm_variable *var, double x);  /* f'           */
+  double (* func_fpi)  (struct lmm_variable *var, double x);  /* (f')^{-1}    */
+  double (* func_fpip) (struct lmm_variable *var, double x);  /* ((f')^{-1})' */
 } s_lmm_variable_t;
 
 typedef struct lmm_system {
 } s_lmm_variable_t;
 
 typedef struct lmm_system {
index 9f80c8e..1097df4 100644 (file)
@@ -353,6 +353,9 @@ static void update_resource_state(void *id,
        if(action->suspended==0)
          lmm_update_variable_weight(maxmin_system, action->variable, 
                                     action->lat_current);
        if(action->suspended==0)
          lmm_update_variable_weight(maxmin_system, action->variable, 
                                     action->lat_current);
+       lmm_update_variable_latency(maxmin_system, action->variable, delta);
+       
+
       }
     } else if (event_type == nw_link->state_event) {
       if (value > 0)
       }
     } else if (event_type == nw_link->state_event) {
       if (value > 0)
@@ -491,6 +494,7 @@ static double get_available_speed(void *cpu)
   return ((cpu_KCCFLN05_t) cpu)->power_current;
 }
 
   return ((cpu_KCCFLN05_t) cpu)->power_current;
 }
 
+
 static surf_action_t communicate(void *src, void *dst, double size, double rate)
 {
   surf_action_workstation_KCCFLN05_t action = NULL;
 static surf_action_t communicate(void *src, void *dst, double size, double rate)
 {
   surf_action_workstation_KCCFLN05_t action = NULL;
@@ -555,6 +559,8 @@ static surf_action_t communicate(void *src, void *dst, double size, double rate)
       lmm_update_variable_bound(maxmin_system, action->variable, action->rate);
   }
 
       lmm_update_variable_bound(maxmin_system, action->variable, action->rate);
   }
 
+  lmm_update_variable_latency(maxmin_system, action->variable, action->latency);
+  
   for (i = 0; i < route_size; i++)
     lmm_expand(maxmin_system, route->links[i]->constraint, action->variable, 1.0);
   if (card_src->bus)
   for (i = 0; i < route_size; i++)
     lmm_expand(maxmin_system, route->links[i]->constraint, action->variable, 1.0);
   if (card_src->bus)