Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Check if the host is down in SIMIX_post_process_sleep.
authorSamuel Lepetit <samuel.lepetit@inria.fr>
Thu, 21 Jun 2012 11:52:08 +0000 (13:52 +0200)
committerSamuel Lepetit <samuel.lepetit@inria.fr>
Thu, 21 Jun 2012 12:26:28 +0000 (14:26 +0200)
src/simix/smx_process.c

index 0020a7a..1d35e54 100644 (file)
@@ -584,7 +584,8 @@ void SIMIX_post_process_sleep(smx_action_t action)
 
     switch(surf_workstation_model->action_state_get(action->sleep.surf_sleep)){
       case SURF_ACTION_FAILED:
-       SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
+        simcall->issuer->context->iwannadie = 1;
+        //SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
         break;
 
       case SURF_ACTION_DONE:
@@ -595,9 +596,14 @@ void SIMIX_post_process_sleep(smx_action_t action)
         THROW_IMPOSSIBLE;
         break;
     }
+    if (surf_workstation_model->extension.
+        workstation.get_state(simcall->issuer->smx_host->host) != SURF_RESOURCE_ON) {
+      simcall->issuer->context->iwannadie = 1;
+    }
     simcall->process_sleep.result = state;
     simcall->issuer->waiting_action = NULL;
     SIMIX_simcall_answer(simcall);
+
   }
   SIMIX_process_sleep_destroy(action);
 }