Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New values from INRIA RR-7821 (callibration when phase effects are removed).
[simgrid.git] / src / surf / network_im.c
index 8c33ec3..56b90df 100644 (file)
@@ -41,7 +41,7 @@ double sg_bandwidth_factor = 1.0;       /* default value; can be set by model or
 double sg_weight_S_parameter = 0.0;     /* default value; can be set by model or from command line */
 
 double sg_tcp_gamma = 0.0;
-int sg_network_fullduplex = 0;
+int sg_network_crosstraffic = 0;
 
 xbt_dict_t gap_lookup = NULL;
 
@@ -783,7 +783,7 @@ static surf_action_t im_net_communicate(const char *src_name,
   xbt_dynar_t route=xbt_dynar_new(global_routing->size_of_link,NULL);
   routing_get_route_and_latency(src_name, dst_name, &route, &latency);
 
-  if (sg_network_fullduplex == 1) {
+  if (sg_network_crosstraffic == 1) {
     // FIXME: fill route directly (unclear: check with blame who put the FIXME)
     routing_get_route_and_latency(dst_name, src_name, &back_route,NULL);
   }
@@ -804,6 +804,15 @@ static surf_action_t im_net_communicate(const char *src_name,
       break;
     }
   }
+  if (sg_network_crosstraffic == 1) {
+    xbt_dynar_foreach(back_route, i, link) {
+      if (link->lmm_resource.state_current == SURF_RESOURCE_OFF) {
+        failed = 1;
+        break;
+      }
+    }
+  }
+
   action =
       surf_action_new(sizeof(s_surf_action_network_CM02_im_t), size,
                       surf_network_model, failed);
@@ -906,7 +915,7 @@ static surf_action_t im_net_communicate(const char *src_name,
                action->variable, 1.0);
   }
 
-  if (sg_network_fullduplex == 1) {
+  if (sg_network_crosstraffic == 1) {
     XBT_DEBUG("Fullduplex active adding backward flow using 5%c", '%');
     xbt_dynar_foreach(back_route, i, link) {
       lmm_expand(network_im_maxmin_system, link->lmm_resource.constraint,
@@ -1167,10 +1176,9 @@ void im_surf_network_model_init_LegrandVelho(void)
   xbt_dynar_push(model_list, &surf_network_model);
   network_im_solve = lmm_solve;
 
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/latency_factor", 10.4);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",
-                            0.92);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);
+  xbt_cfg_setdefault_double(_surf_cfg_set, "network/latency_factor", 10.4); // 13.01 when callibration is done without phase effects
+  xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",0.92);// 0.97 when callibration is done without phase effects
+  xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);       // 20537 when callibration is done without phase effects
 }
 
 /***************************************************************************/