Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce the run size for the MC
[simgrid.git] / src / simix / smx_network.c
index 8280532..5a1d603 100644 (file)
@@ -315,7 +315,7 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
   return action;
 }
 
-void SIMIX_pre_comm_wait(smx_req_t req)
+void SIMIX_pre_comm_wait(smx_req_t req, int idx)
 {
   smx_action_t action = req->comm_wait.comm;
   double timeout = req->comm_wait.timeout;
@@ -326,7 +326,7 @@ void SIMIX_pre_comm_wait(smx_req_t req)
   req->issuer->waiting_action = action;
 
   if (MC_IS_ENABLED){
-    if(action->comm.src_proc && action->comm.dst_proc){
+    if(idx == 0){
       action->state = SIMIX_DONE;
     }else{
       /* If we reached this point, the wait request must have a timeout */
@@ -372,7 +372,7 @@ void SIMIX_pre_comm_test(smx_req_t req)
   }
 }
 
-void SIMIX_pre_comm_testany(smx_req_t req, unsigned int idx)
+void SIMIX_pre_comm_testany(smx_req_t req, int idx)
 {
   unsigned int cursor;
   smx_action_t action;
@@ -380,7 +380,7 @@ void SIMIX_pre_comm_testany(smx_req_t req, unsigned int idx)
   req->comm_testany.result = -1;
 
   if (MC_IS_ENABLED){
-    if((int)idx == -1){
+    if(idx == -1){
       SIMIX_request_answer(req);
     }else{
       action = xbt_dynar_get_as(actions, idx, smx_action_t);
@@ -402,7 +402,7 @@ void SIMIX_pre_comm_testany(smx_req_t req, unsigned int idx)
   SIMIX_request_answer(req);
 }
 
-void SIMIX_pre_comm_waitany(smx_req_t req, unsigned int idx)
+void SIMIX_pre_comm_waitany(smx_req_t req, int idx)
 {
   smx_action_t action;
   unsigned int cursor = 0;