X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f0cd8bad281b6428eb9736724025ade137fd4dfe..38fad1a54be8df52b153c7f9ca4c40ced5dba8c9:/src/surf/network.c diff --git a/src/surf/network.c b/src/surf/network.c index 412779c2c3..202c2c613f 100644 --- a/src/surf/network.c +++ b/src/surf/network.c @@ -6,6 +6,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "network_private.h" +#include "xbt/log.h" #define SG_TCP_CTE_GAMMA 20000.0 @@ -126,7 +127,7 @@ static void parse_network_link(void) xbt_assert0((A_network_link_state==A_network_link_state_ON)|| (A_network_link_state==A_network_link_state_OFF), - "Invalid state") + "Invalid state"); if (A_network_link_state==A_network_link_state_ON) state_initial = SURF_NETWORK_LINK_ON; else if (A_network_link_state==A_network_link_state_OFF) @@ -400,6 +401,8 @@ 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_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); action->generic_action.using = 1; @@ -447,10 +450,6 @@ 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); - if(route_size == 0) { - action_change_state((surf_action_t) action, SURF_ACTION_DONE); - } - return (surf_action_t) action; }