Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix a comparison between different enums
[simgrid.git] / src / mc / mc_request.c
index 07238b8..412a73f 100644 (file)
@@ -2,6 +2,9 @@
 
 int MC_request_depend(smx_req_t r1, smx_req_t r2)
 {
+  if(_surf_do_model_check == 2)
+    return TRUE;
+
   if (r1->issuer == r2->issuer)
     return FALSE;
 
@@ -22,10 +25,10 @@ int MC_request_depend(smx_req_t r1, smx_req_t r2)
     if(r2->comm_wait.comm->comm.rdv != rdv)
       return FALSE;
 
-    if(r2->comm_wait.comm->type == SIMIX_COMM_SEND && r1->call == REQ_COMM_ISEND)
+    if(r2->comm_wait.comm->comm.type == SIMIX_COMM_SEND && r1->call == REQ_COMM_ISEND)
       return FALSE;
 
-    if(r2->comm_wait.comm->type == SIMIX_COMM_RECEIVE && r1->call == REQ_COMM_IRECV)
+    if(r2->comm_wait.comm->comm.type == SIMIX_COMM_RECEIVE && r1->call == REQ_COMM_IRECV)
       return FALSE;
   }
 
@@ -40,10 +43,10 @@ int MC_request_depend(smx_req_t r1, smx_req_t r2)
     if(r1->comm_wait.comm->comm.rdv != rdv)
       return FALSE;
 
-    if(r1->comm_wait.comm->type == SIMIX_COMM_SEND && r2->call == REQ_COMM_ISEND)
+    if(r1->comm_wait.comm->comm.type == SIMIX_COMM_SEND && r2->call == REQ_COMM_ISEND)
       return FALSE;
 
-    if(r1->comm_wait.comm->type == SIMIX_COMM_RECEIVE && r2->call == REQ_COMM_IRECV)
+    if(r1->comm_wait.comm->comm.type == SIMIX_COMM_RECEIVE && r2->call == REQ_COMM_IRECV)
       return FALSE;
   }
 
@@ -160,15 +163,15 @@ char *MC_request_to_string(smx_req_t req, int value)
     case REQ_COMM_WAIT:
       act = req->comm_wait.comm;
       if(value == -1){
-        type = bprintf("Wait Timeout");
+        type = bprintf("WaitTimeout");
         args = bprintf("comm=%p", act);
       }else{
         type = bprintf("Wait");
-        args  = bprintf("comm=%p [%s(%lu) -> %s(%lu)]", act,
-                        act->comm.src_proc ? act->comm.src_proc->name : "",
+        args  = bprintf("comm=%p [(%lu)%s -> (%lu)%s]", act,
                         act->comm.src_proc ? act->comm.src_proc->pid : 0,
-                        act->comm.dst_proc ? act->comm.dst_proc->name : "",
-                        act->comm.dst_proc ? act->comm.dst_proc->pid : 0);
+                        act->comm.src_proc ? act->comm.src_proc->name : "",
+                        act->comm.dst_proc ? act->comm.dst_proc->pid : 0,
+                        act->comm.dst_proc ? act->comm.dst_proc->name : "");
       }
       break;
     case REQ_COMM_TEST: