Skip to content

Commit b0f9b63

Browse files
author
Ralph Castain
committed
Need to delay registration of the waitpid callback until after the fork/exec of the child process. Fix the bit testing of process type so that the proper state component gets selected for HNP.
(cherry picked from commit open-mpi/ompi@f1483eb)
1 parent 1a2c468 commit b0f9b63

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

orte/mca/odls/base/odls_base_default_fns.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,12 +1035,11 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata)
10351035
}
10361036
}
10371037

1038-
orte_wait_cb(child, odls_base_default_wait_local_proc, NULL);
10391038
if (ORTE_SUCCESS != (rc = fork_local(app, child, app->env, jobdat))) {
1040-
orte_wait_cb_cancel(child);
10411039
child->exit_code = ORTE_ERR_SILENT; /* error message already output */
10421040
ORTE_ACTIVATE_PROC_STATE(&child->name, ORTE_PROC_STATE_FAILED_TO_START);
10431041
}
1042+
orte_wait_cb(child, odls_base_default_wait_local_proc, NULL);
10441043
/* if we indexed the argv, we need to restore it to
10451044
* its original form
10461045
*/

orte/util/proc_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ typedef uint32_t orte_proc_type_t;
7575
#define ORTE_PROC_IS_DVM (ORTE_PROC_DVM & orte_process_info.proc_type)
7676
#define ORTE_PROC_IS_IOF_ENDPT (ORTE_PROC_IOF_ENDPT & orte_process_info.proc_type)
7777
#define ORTE_PROC_IS_SCHEDULER (ORTE_PROC_SCHEDULER & orte_process_info.proc_type)
78-
#define ORTE_PROC_IS_MASTER (ORTE_PROC_MASTER & orte_process_info.proc_type)
78+
#define ORTE_PROC_IS_MASTER (0x4000 & orte_process_info.proc_type)
7979

8080

8181
/**

0 commit comments

Comments
 (0)