Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use xbt_os_time
[simgrid.git] / src / gras / Transport / sg_transport.c
index 279642c..8567f36 100644 (file)
@@ -31,7 +31,7 @@ gras_trp_select(double timeout,
 
   xbt_error_t errcode;
   double startTime=gras_os_time();
-  gras_procdata_t *pd=gras_procdata_get();
+  gras_trp_procdata_t pd=(gras_trp_procdata_t)gras_libdata_get("gras_trp");
   gras_trp_sg_sock_data_t *sockdata;
   gras_trp_plugin_t *trp;
 
@@ -128,17 +128,20 @@ gras_trp_select(double timeout,
 
       return no_error;
     } else {
-      /*
-      DEBUG2("Select on %s@%s did not find anything yet",
+      DEBUG5("Select on %s@%s did not find anything yet at %f (waited %f of %f sec)",
             MSG_process_get_name(MSG_process_self()),
-            MSG_host_get_name(MSG_host_self()));
-      */
+            MSG_host_get_name(MSG_host_self()),
+            gras_os_time(),
+            gras_os_time()-startTime , timeout);
       /* MSG_process_sleep(1); */
       MSG_process_sleep(0.001);
     }
   } while (gras_os_time()-startTime < timeout
           || MSG_task_Iprobe((m_channel_t) pd->chan));
 
+  DEBUG0("TIMEOUT");
   return timeout_error;
 
 }