Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Check if the host is down at the end of a SIMIX_io_finish
authorSamuel Lepetit <samuel.lepetit@inria.fr>
Thu, 21 Jun 2012 13:34:42 +0000 (15:34 +0200)
committerSamuel Lepetit <samuel.lepetit@inria.fr>
Thu, 21 Jun 2012 13:34:51 +0000 (15:34 +0200)
src/simix/smx_io.c

index 8030aca..33424c6 100644 (file)
@@ -289,6 +289,12 @@ void SIMIX_io_finish(smx_action_t action)
         xbt_die("Internal error in SIMIX_io_finish: unexpected action state %d",
             (int)action->state);
     }
+
+    if (surf_workstation_model->extension.
+        workstation.get_state(simcall->issuer->smx_host->host) != SURF_RESOURCE_ON) {
+      simcall->issuer->context->iwannadie = 1;
+    }
+
     simcall->issuer->waiting_action = NULL;
     SIMIX_simcall_answer(simcall);
   }