Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not close socket which were never opened (see documentation of the gras_meas_accep...
[simgrid.git] / src / amok / Bandwidth / saturate.c
index dad4595..203535b 100644 (file)
@@ -174,7 +174,7 @@ void amok_bw_saturate_begin(const char* to_name,unsigned int to_port,
 
     /* Check whether the experiment has to be terminated by now */
     elapsed=gras_os_time()-start;
-    INFO2("elapsed %f duration %f",elapsed, duration);
+    VERB2("elapsed %f duration %f",elapsed, duration);
 
   } while (saturate_further && elapsed < duration);
 
@@ -260,7 +260,8 @@ static int amok_bw_cb_sat_begin(gras_msg_cb_ctx_t ctx, void *payload){
   }
   INFO1("Saturation stopped on %s",gras_os_myname());
   gras_socket_close(meas);
-  gras_socket_close(measMaster);
+  if (gras_if_RL()) /* On SG, accepted=master */
+    gras_socket_close(measMaster); 
   free(request);
   return 1;
 }