From: alegrand Date: Wed, 26 Nov 2008 14:02:53 +0000 (+0000) Subject: Add debug on topology. X-Git-Tag: v3.3~71 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ec14673a153cd09717e81a88458258b2c69c79a2 Add debug on topology. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6108 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/surf/gtnets/gtnets_interface.cc b/src/surf/gtnets/gtnets_interface.cc index d77edb62ae..4207edbf0f 100644 --- a/src/surf/gtnets/gtnets_interface.cc +++ b/src/surf/gtnets/gtnets_interface.cc @@ -101,3 +101,8 @@ int gtnets_finalize(){ return 0; } +// print topology +void gtnets_print_topology(void){ + gtnets_sim->print_topology(); +} + diff --git a/src/surf/gtnets/gtnets_interface.h b/src/surf/gtnets/gtnets_interface.h index 6d11d68e24..c1955ffc27 100644 --- a/src/surf/gtnets/gtnets_interface.h +++ b/src/surf/gtnets/gtnets_interface.h @@ -22,6 +22,8 @@ extern "C" { int gtnets_run_until_next_flow_completion(void*** metadata, int* number_of_flows); double gtnets_get_flow_rx(void *metadata); + void gtnets_print_topology(void); + int gtnets_run(double delta); int gtnets_finalize(); diff --git a/src/surf/gtnets/gtnets_simulator.cc b/src/surf/gtnets/gtnets_simulator.cc index e915aa65f6..dafa66844e 100644 --- a/src/surf/gtnets/gtnets_simulator.cc +++ b/src/surf/gtnets/gtnets_simulator.cc @@ -157,6 +157,10 @@ void GTSim::create_gtnets_topology(){ node_connect(); } +void GTSim::print_topology(){ + topo_->print_topology(); +} + // Add a route that includes more than one hop. All one hop // routes must have been added. When this function is called // for the first time, all gtnets nodes are generated. diff --git a/src/surf/gtnets/gtnets_simulator.h b/src/surf/gtnets/gtnets_simulator.h index ac70308d29..2b870a176e 100644 --- a/src/surf/gtnets/gtnets_simulator.h +++ b/src/surf/gtnets/gtnets_simulator.h @@ -47,6 +47,7 @@ public: // returns the total received by the TCPServer peer of the given action double gtnets_get_flow_rx(void *metadata); void create_gtnets_topology(); + void print_topology(); private: void add_nodes(); void node_connect(); diff --git a/src/surf/network_gtnets.c b/src/surf/network_gtnets.c index 00ea4a9878..59a344ad19 100644 --- a/src/surf/network_gtnets.c +++ b/src/surf/network_gtnets.c @@ -291,6 +291,7 @@ static void add_route() } xbt_dict_free(&route_table); + gtnets_print_topology(); XBT_OUT; }