Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Handle FAT_PIPES.
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 10 Aug 2007 15:56:36 +0000 (15:56 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 10 Aug 2007 15:56:36 +0000 (15:56 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4072 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/fair_bottleneck.c
src/surf/workstation_ptask_L07.c

index 363ece0..34a7329 100644 (file)
@@ -29,7 +29,6 @@ void bottleneck_solve(lmm_system_t sys)
 
   static s_xbt_swag_t cnst_to_update;
 
-
   if (!(sys->modified))
     return;
 
@@ -63,7 +62,6 @@ void bottleneck_solve(lmm_system_t sys)
       int nb = 0;
       elem_list = &(cnst->element_set);
       cnst->usage = 0.0;
-      if(!cnst->shared) DIE_IMPOSSIBLE;
       xbt_swag_foreach(elem, elem_list) {
        if(elem->variable->weight <=0) break;
        if ((elem->value > 0)) {
@@ -76,6 +74,7 @@ void bottleneck_solve(lmm_system_t sys)
        DEBUG2("Constraint Usage %p : %f",cnst,cnst->usage);
        //      make_elem_active(elem);
       }
+      if(!cnst->shared) nb=1;
       cnst->usage = cnst->usage * nb;
       /* Saturated constraints update */
       if(min_usage<0 || min_usage > cnst->remaining / cnst->usage) {
@@ -99,6 +98,8 @@ void bottleneck_solve(lmm_system_t sys)
        if(elem->variable->weight <=0) break;
        if ((elem->value > 0)) nb++;
       }
+      if(!cnst->shared) nb=1;
+
       xbt_swag_foreach(elem, elem_list) {
        var=elem->variable;
        if(var->weight <=0) break;
index b99bd8f..3e5a5de 100644 (file)
@@ -68,6 +68,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_workstation);
 static int nb_workstation = 0;
 static s_route_L07_t *routing_table = NULL;
 #define ROUTE(i,j) routing_table[(i)+(j)*nb_workstation]
+static network_link_L07_t loopback = NULL;
 static xbt_dict_t parallel_task_network_link_set = NULL;
 lmm_system_t ptask_maxmin_system = NULL;
 
@@ -766,12 +767,15 @@ static void parse_file(const char *file)
   /* Adding loopback if needed */    
   for (i = 0; i < nb_workstation; i++) 
     if(!ROUTE(i,i).size) {
+      if(!loopback)
+       loopback = network_link_new(xbt_strdup("__MSG_loopback__"), 
+                                  498000000, NULL, 
+                                  SURF_NETWORK_LINK_ON, NULL,
+                                  SURF_NETWORK_LINK_FATPIPE);
+
       ROUTE(i,i).size=1;
       ROUTE(i,i).links = xbt_new0(network_link_L07_t, 1);
-      ROUTE(i,i).links[0] = network_link_new(xbt_strdup("__MSG_loopback__"), 
-                                  498000000, NULL,
-                                  SURF_NETWORK_LINK_ON, NULL,
-                                  SURF_NETWORK_LINK_SHARED);
+      ROUTE(i,i).links[0] = loopback;
     }
 }