Skip to content

Commit 659aec7

Browse files
author
Ralph Castain
committed
Set the registered/deregistered flags so we correctly detect exit without calling finalize
Correctly use the returned server object Signed-off-by: Ralph Castain <[email protected]>
1 parent d0b97d7 commit 659aec7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

orte/mca/state/base/state_base_fns.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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);

orte/orted/pmix/pmix_server_gen.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* All rights reserved.
1414
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
1515
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
16-
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
16+
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2014 Mellanox Technologies, Inc.
1818
* All rights reserved.
1919
* Copyright (c) 2014 Research Organization for Information Science
@@ -58,7 +58,7 @@ int pmix_server_client_finalized_fn(opal_process_name_t *proc, void *server_obje
5858

5959
if (NULL != cbdata) {
6060
/* we were passed back the orte_proc_t */
61-
p = (orte_proc_t*)cbdata;
61+
p = (orte_proc_t*)server_object;
6262
} else {
6363
/* find the named process */
6464
p = NULL;
@@ -80,6 +80,7 @@ int pmix_server_client_finalized_fn(opal_process_name_t *proc, void *server_obje
8080
}
8181
if (NULL != p) {
8282
p->state = ORTE_PROC_STATE_TERMINATED;
83+
ORTE_FLAG_SET(p, ORTE_PROC_FLAG_HAS_DEREG);
8384
/* release the caller */
8485
if (NULL != cbfunc) {
8586
cbfunc(ORTE_SUCCESS, cbdata);

0 commit comments

Comments
 (0)