- /* FIXME: check if the host running the action failed or not*/
- /*if(surf_workstation_model->extension.workstation.get_state(action->host->host))*/
-
- /* If the host running the action didn't fail, then the action was cancelled */
- if (surf_workstation_model->action_state_get(action->execution.surf_exec) == SURF_ACTION_FAILED)
+ if (surf_workstation_model->extension.workstation.get_state(action->execution.host->host)==SURF_RESOURCE_OFF) {
+ /* if the host running the action failed, notice it so that the asking process can be killed if it runs on that host itself */
+ action->state = SIMIX_FAILED;
+ } else if (surf_workstation_model->action_state_get(action->execution.surf_exec) == SURF_ACTION_FAILED) {
+ /* If the host running the action didn't fail, then the action was canceled */