Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Small bugfixes to stabilize the MC
authorcristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 7 Jan 2011 08:23:58 +0000 (08:23 +0000)
committercristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 7 Jan 2011 08:23:58 +0000 (08:23 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9381 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/mc/mc_dpor.c
src/mc/mc_global.c
src/simix/smx_process.c
src/simix/smx_smurf.c

index bc37c91..bed97ec 100644 (file)
@@ -118,17 +118,19 @@ void MC_dpor(void)
     } else {
       DEBUG0("There are no more processes to interleave.");
 
+      /* Trash the current state, no longer needed */
+      MC_SET_RAW_MEM;
+      xbt_fifo_shift(mc_stack);
+      MC_state_delete(state);
+      MC_UNSET_RAW_MEM;
+
       /* Check for deadlocks */
       if(MC_deadlock_check()){
-        MC_show_deadlock(&process->request);
+        MC_show_deadlock(NULL);
         return;
       }
 
-      /* Trash the current state, no longer needed */
       MC_SET_RAW_MEM;
-      xbt_fifo_shift(mc_stack);
-      MC_state_delete(state);
-
       /* Traverse the stack backwards until a state with a non empty interleave
          set is found, deleting all the states that have it empty in the way.
          For each deleted state, check if the request that has generated it 
index 50b1c74..4e24e3c 100644 (file)
@@ -197,14 +197,14 @@ void MC_show_stack(xbt_fifo_t stack)
 
 void MC_show_deadlock(smx_req_t req)
 {
-  char *req_str = NULL;
+  /*char *req_str = NULL;*/
   INFO0("**************************");
   INFO0("*** DEAD-LOCK DETECTED ***");
   INFO0("**************************");
   INFO0("Locked request:");
-  req_str = MC_request_to_string(req);
+  /*req_str = MC_request_to_string(req);
   INFO1("%s", req_str);
-  xbt_free(req_str);
+  xbt_free(req_str);*/
   INFO0("Counter-example execution trace:");
   MC_dump_stack(mc_stack);
 }
index 136a1f6..607f0bb 100644 (file)
@@ -245,6 +245,7 @@ void SIMIX_process_killall(void)
   while ((p = xbt_swag_extract(simix_global->process_list)))
     SIMIX_process_kill(p, SIMIX_process_self());
 
+  SIMIX_context_runall(simix_global->process_to_run);
   SIMIX_context_runall(simix_global->process_to_run);
   SIMIX_process_empty_trash();
 }
index 3f2045d..a5c10c9 100644 (file)
@@ -103,6 +103,11 @@ int SIMIX_request_is_enabled(smx_req_t req)
       return FALSE;
       break;
 
+    case REQ_COMM_TEST:
+      act = req->comm_test.comm;
+      return (act->comm.src_proc && act->comm.dst_proc);
+      break;
+
     default:    
       return TRUE;
   }