11/*
22 * Copyright (c) 2011-2012 Los Alamos National Security, LLC.
3- * Copyright (c) 2014 Intel, Inc. All rights reserved.
3+ * Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
44 * $COPYRIGHT$
55 *
66 * Additional copyrights may follow
@@ -491,6 +491,7 @@ void orte_state_base_track_procs(int fd, short argc, void *cbdata)
491491 } else if (ORTE_PROC_STATE_REGISTERED == state ) {
492492 /* update the proc state */
493493 pdata -> state = state ;
494+ ORTE_FLAG_SET (pdata , ORTE_PROC_FLAG_REG );
494495 jdata -> num_reported ++ ;
495496 if (jdata -> num_reported == jdata -> num_procs ) {
496497 ORTE_ACTIVATE_JOB_STATE (jdata , ORTE_JOB_STATE_REGISTERED );
@@ -521,13 +522,13 @@ void orte_state_base_track_procs(int fd, short argc, void *cbdata)
521522 /* update the proc state */
522523 ORTE_FLAG_UNSET (pdata , ORTE_PROC_FLAG_ALIVE );
523524 pdata -> state = state ;
524- if (ORTE_FLAG_TEST (pdata , ORTE_PROC_FLAG_LOCAL )) {
525+ if (ORTE_FLAG_TEST (pdata , ORTE_PROC_FLAG_LOCAL )) {
525526 /* Clean up the session directory as if we were the process
526527 * itself. This covers the case where the process died abnormally
527528 * and didn't cleanup its own session directory.
528529 */
529530 orte_session_dir_finalize (proc );
530- }
531+ }
531532 /* if we are trying to terminate and our routes are
532533 * gone, then terminate ourselves IF no local procs
533534 * remain (might be some from another job)
@@ -550,11 +551,11 @@ void orte_state_base_track_procs(int fd, short argc, void *cbdata)
550551 }
551552 /* return the allocated slot for reuse */
552553 cleanup_node (pdata );
553- /* track job status */
554- jdata -> num_terminated ++ ;
555- if (jdata -> num_terminated == jdata -> num_procs ) {
554+ /* track job status */
555+ jdata -> num_terminated ++ ;
556+ if (jdata -> num_terminated == jdata -> num_procs ) {
556557 ORTE_ACTIVATE_JOB_STATE (jdata , ORTE_JOB_STATE_TERMINATED );
557- }
558+ }
558559 }
559560
560561 cleanup :
@@ -752,10 +753,10 @@ void orte_state_base_check_all_complete(int fd, short args, void *cbdata)
752753 * is maintained!
753754 */
754755 if (1 < j ) {
755- if (ORTE_FLAG_TEST (jdata , ORTE_JOB_FLAG_DEBUGGER_DAEMON )) {
756- /* this was a debugger daemon. notify that a debugger has detached */
757- ORTE_ACTIVATE_JOB_STATE (jdata , ORTE_JOB_STATE_DEBUGGER_DETACH );
758- }
756+ if (ORTE_FLAG_TEST (jdata , ORTE_JOB_FLAG_DEBUGGER_DAEMON )) {
757+ /* this was a debugger daemon. notify that a debugger has detached */
758+ ORTE_ACTIVATE_JOB_STATE (jdata , ORTE_JOB_STATE_DEBUGGER_DETACH );
759+ }
759760 opal_pointer_array_set_item (orte_job_data , j , NULL ); /* ensure the array has a NULL */
760761 OBJ_RELEASE (jdata );
761762 }
0 commit comments