Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add the latency factor for the standard model as well as for the new LegrandVelho...
authorvelho <velho@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 16 Oct 2008 14:31:59 +0000 (14:31 +0000)
committervelho <velho@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 16 Oct 2008 14:31:59 +0000 (14:31 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5995 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/network.c

index 7acfc6f..99f4a92 100644 (file)
@@ -18,6 +18,8 @@ static void (*network_solve) (lmm_system_t) = NULL;
 xbt_dict_t link_set = NULL;
 xbt_dict_t network_card_set = NULL;
 
+double latency_factor = 1.0; /* default value */
+
 int card_number = 0;
 int host_number = 0;
 link_CM02_t **routing_table = NULL;
@@ -541,6 +543,8 @@ static surf_action_t communicate(void *src, void *dst, double size,
   /* LARGE PLATFORMS HACK:
      Add src->link and dst->link latencies */
   action->lat_current = action->latency;
+  action->latency *= latency_factor;
+
 
   /* LARGE PLATFORMS HACK:
      lmm_variable_new(..., total_route_size)*/
@@ -774,6 +778,8 @@ void surf_network_model_init_LegrandVelho(const char *filename)
   define_callbacks(filename);
   xbt_dynar_push(model_list, &surf_network_model);
   network_solve = lmm_solve;
+   
+  latency_factor = 10.4;
 
   update_model_description(surf_network_model_description,
                           "LegrandVelho",