Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Shorter delays, more logging
[simgrid.git] / src / amok / Bandwidth / bandwidth.c
index c7608b9..806eec0 100644 (file)
@@ -153,7 +153,7 @@ void amok_bw_test(gras_socket_t peer,
        buf_size,request->buf_size);
 
   TRY {
-    gras_msg_rpccall(peer,60,
+    gras_msg_rpccall(peer,15,
                     gras_msgtype_by_name("BW handshake"),&request, &request_ack);
   } CATCH(e) {
     RETHROW0("Error encountered while sending the BW request: %s");
@@ -179,6 +179,7 @@ void amok_bw_test(gras_socket_t peer,
       DEBUG4("The experiment was too short (%f sec<%f sec). Redo it with exp_size=%ld (got %fkb/s)",
             meas_duration,min_duration,request->exp_size,((double)exp_size) / *sec/1024);
       gras_msg_rpccall(peer, 60, gras_msgtype_by_name("BW reask"),&request, NULL);      
+      DEBUG0("Peer is ready for another round of fun");
     }
 
     *sec=gras_os_time();
@@ -297,6 +298,7 @@ int amok_bw_cb_bw_handshake(gras_msg_cb_ctx_t  ctx,
     void *payload;
     int msggot;
     TRY {
+      DEBUG0("Recv / Send the experiment");
       gras_socket_meas_recv(measIn, 120,request->exp_size,request->msg_size);
       gras_socket_meas_send(measOut,120,1,1);
       DEBUG0("ACK sent");
@@ -316,6 +318,7 @@ int amok_bw_cb_bw_handshake(gras_msg_cb_ctx_t  ctx,
       tooshort = 1;
       free(request);
       request = (bw_request_t)payload;
+      VERB0("Return the reasking RPC");
       gras_msg_rpcreturn(60,ctx_reask,NULL);
     }
     gras_msg_cb_ctx_free(ctx_reask);
@@ -374,7 +377,9 @@ void amok_bw_request(const char* from_name,unsigned int from_port,
   request->host.port = to_port;
 
   sock = gras_socket_client(from_name,from_port);
-  gras_msg_rpccall(sock,240,gras_msgtype_by_name("BW request"),&request, &result);
+  DEBUG4("Ask for a BW test between %s:%d and %s:%d",  from_name,from_port, to_name,to_port);
+
+  gras_msg_rpccall(sock,20*60,gras_msgtype_by_name("BW request"), &request, &result);
   
   if (sec)
     *sec=result->sec;
@@ -419,11 +424,12 @@ int amok_bw_cb_bw_request(gras_msg_cb_ctx_t ctx,
   return 1;
 }
 
+/** \brief builds a matrix of results of bandwidth measurement */
 double * amok_bw_matrix(xbt_dynar_t hosts,
                        int buf_size_bw, int exp_size_bw, int msg_size_bw,
                        double min_duration) { 
   double sec;
-  /* construct of matrixs for bandwith and Latency */
+  /* construction of matrices for bandwith and latency */
 
 
   int i,j,len=xbt_dynar_length(hosts);