|
1 | 1 | /* |
2 | 2 | * Copyright (c) 2011-2012 Los Alamos National Security, LLC. |
3 | 3 | * All rights reserved. |
4 | | - * Copyright (c) 2014 Intel, Inc. All rights reserved. |
| 4 | + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. |
5 | 5 | * $COPYRIGHT$ |
6 | 6 | * |
7 | 7 | * Additional copyrights may follow |
@@ -129,7 +129,7 @@ static int init(void) |
129 | 129 | } |
130 | 130 | } |
131 | 131 | if (5 < opal_output_get_verbosity(orte_state_base_framework.framework_output)) { |
132 | | - orte_state_base_print_proc_state_machine(); |
| 132 | + orte_state_base_print_proc_state_machine(); |
133 | 133 | } |
134 | 134 | return ORTE_SUCCESS; |
135 | 135 | } |
@@ -199,11 +199,20 @@ static void track_jobs(int fd, short argc, void *cbdata) |
199 | 199 | OBJ_RELEASE(alert); |
200 | 200 | goto cleanup; |
201 | 201 | } |
202 | | - /* pack the RUNNING state */ |
203 | | - if (ORTE_SUCCESS != (rc = opal_dss.pack(alert, &running, 1, ORTE_PROC_STATE))) { |
204 | | - ORTE_ERROR_LOG(rc); |
205 | | - OBJ_RELEASE(alert); |
206 | | - goto cleanup; |
| 202 | + /* if this proc failed to start, then send that info */ |
| 203 | + if (ORTE_PROC_STATE_UNTERMINATED < child->state) { |
| 204 | + if (ORTE_SUCCESS != (rc = opal_dss.pack(alert, &child->state, 1, ORTE_PROC_STATE))) { |
| 205 | + ORTE_ERROR_LOG(rc); |
| 206 | + OBJ_RELEASE(alert); |
| 207 | + goto cleanup; |
| 208 | + } |
| 209 | + } else { |
| 210 | + /* pack the RUNNING state to avoid any race conditions */ |
| 211 | + if (ORTE_SUCCESS != (rc = opal_dss.pack(alert, &running, 1, ORTE_PROC_STATE))) { |
| 212 | + ORTE_ERROR_LOG(rc); |
| 213 | + OBJ_RELEASE(alert); |
| 214 | + goto cleanup; |
| 215 | + } |
207 | 216 | } |
208 | 217 | /* pack its exit code */ |
209 | 218 | if (ORTE_SUCCESS != (rc = opal_dss.pack(alert, &child->exit_code, 1, ORTE_EXIT_CODE))) { |
|
0 commit comments