From 391ee6bd762d50da260794490ab4145ee7bb3e89 Mon Sep 17 00:00:00 2001 From: Samuel Lepetit Date: Thu, 21 Jun 2012 15:34:42 +0200 Subject: [PATCH 1/1] Check if the host is down at the end of a SIMIX_io_finish --- src/simix/smx_io.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/simix/smx_io.c b/src/simix/smx_io.c index 8030acac61..33424c6ba8 100644 --- a/src/simix/smx_io.c +++ b/src/simix/smx_io.c @@ -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); } -- 2.20.1