Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Adding traces for easier debuging + bugfix
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 27 Mar 2006 11:18:43 +0000 (11:18 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 27 Mar 2006 11:18:43 +0000 (11:18 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1987 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/network.c

index 8d6fc84..771b7cd 100644 (file)
@@ -8,8 +8,6 @@
 #include "network_private.h"
 #include "xbt/log.h"
 
-#define SG_TCP_CTE_GAMMA 20000.0
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(network, surf,
                                "Logging specific to the SURF network module");
 
@@ -322,7 +320,8 @@ static void update_actions_state(double now, double delta)
 
     /*   if(action->generic_action.remains<.00001) action->generic_action.remains=0; */
 
-    if (action->generic_action.remains <= 0) {
+    if ((action->generic_action.remains <= 0) && 
+       (lmm_get_variable_weight(action->variable)>0)) {
       action->generic_action.finish = surf_get_clock();
       action_change_state((surf_action_t) action, SURF_ACTION_DONE);
     } else if ((action->generic_action.max_duration != NO_MAX_DURATION) &&
@@ -401,6 +400,7 @@ static surf_action_t communicate(void *src, void *dst, double size, double rate)
   network_link_CM02_t *route = ROUTE(card_src->id, card_dst->id);
   int i;
 
+  XBT_IN4("(%s,%s,%g,%g)",card_src->name,card_dst->name,size,rate);
   xbt_assert2(route_size,"You're trying to send data from %s to %s but there is no connexion between these two cards.", card_src->name, card_dst->name);
 
   action = xbt_new0(s_surf_action_network_CM02_t, 1);
@@ -449,6 +449,7 @@ static surf_action_t communicate(void *src, void *dst, double size, double rate)
 
   for (i = 0; i < route_size; i++)
     lmm_expand(maxmin_system, route[i]->constraint, action->variable, 1.0);
+  XBT_OUT;
 
   return (surf_action_t) action;
 }