X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3248c64c65a5750a7b9cbf23f5896e9a7a0f8374..2c8e75834bbb63acef15c560c3de978ab3cb6fbf:/src/surf/gtnets/gtnets_interface.cc diff --git a/src/surf/gtnets/gtnets_interface.cc b/src/surf/gtnets/gtnets_interface.cc index 7ff053ccfe..7f06cf745c 100644 --- a/src/surf/gtnets/gtnets_interface.cc +++ b/src/surf/gtnets/gtnets_interface.cc @@ -22,13 +22,17 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_network_gtnets_interface, surf_network_gtne // initialize the GTNetS interface and environment -int gtnets_initialize(){ - +int gtnets_initialize(int wsize){ DEBUG0("Using logging."); - xbt_assert0(!gtnets_sim, "gtnets already initialized"); - gtnets_sim = new GTSim(); + if(wsize > 0){ + INFO1("TCP window maximum size : %d", wsize); + gtnets_sim = new GTSim(wsize); + }else{ + gtnets_sim = new GTSim(wsize); + } + return 0; } @@ -89,7 +93,7 @@ double gtnets_get_time_to_next_flow_completion(){ } // run until a flow completes (returns that flow's metadata) -int gtnets_run_until_next_flow_completion(void ***metadata, int *number_of_flows){ +double gtnets_run_until_next_flow_completion(void ***metadata, int *number_of_flows){ ofstream file; streambuf* sbuf; double value; @@ -109,7 +113,7 @@ int gtnets_run_until_next_flow_completion(void ***metadata, int *number_of_flows cout.rdbuf(sbuf); file.close(); } - return value; + return (double) value; } // get the total received in bytes using the TCPServer object totRx field