Skip to content

Commit 03da521

Browse files
committed
orte: remove some dead code related to the new tree_spawn method
Now that the daemon calls remote_spawn itself, there is no longer a need for the "tree_spawn" command nor the associated command processing code since the HNP is no longer sending a tree-spawn message to the orted. Thanks Ralph for the guidance ! Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 4527584 commit 03da521

File tree

8 files changed

+23
-62
lines changed

8 files changed

+23
-62
lines changed

orte/mca/odls/odls_types.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
1414
* All rights reserved.
1515
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
16+
* Copyright (c) 2018 Research Organization for Information Science
17+
* and Technology (RIST). All rights reserved.
1618
* $COPYRIGHT$
1719
*
1820
* Additional copyrights may follow
@@ -44,7 +46,6 @@ typedef uint8_t orte_daemon_cmd_flag_t;
4446
#define ORTE_DAEMON_KILL_LOCAL_PROCS (orte_daemon_cmd_flag_t) 2
4547
#define ORTE_DAEMON_SIGNAL_LOCAL_PROCS (orte_daemon_cmd_flag_t) 3
4648
#define ORTE_DAEMON_ADD_LOCAL_PROCS (orte_daemon_cmd_flag_t) 4
47-
#define ORTE_DAEMON_TREE_SPAWN (orte_daemon_cmd_flag_t) 5
4849
#define ORTE_DAEMON_HEARTBEAT_CMD (orte_daemon_cmd_flag_t) 6
4950
#define ORTE_DAEMON_EXIT_CMD (orte_daemon_cmd_flag_t) 7
5051
#define ORTE_DAEMON_PROCESS_AND_RELAY_CMD (orte_daemon_cmd_flag_t) 9

orte/mca/plm/isolated/plm_isolated.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
1616
* Copyright (c) 2011 IBM Corporation. All rights reserved.
1717
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
18+
* Copyright (c) 2017 Research Organization for Information Science
19+
* and Technology (RIST). All rights reserved.
1820
* $COPYRIGHT$
1921
*
2022
* Additional copyrights may follow
@@ -50,7 +52,7 @@
5052

5153
static int isolated_init(void);
5254
static int isolated_launch(orte_job_t *jdata);
53-
static int remote_spawn(opal_buffer_t *launch);
55+
static int remote_spawn();
5456
static int isolated_terminate_orteds(void);
5557
static int isolated_finalize(void);
5658

@@ -93,7 +95,7 @@ static int isolated_init(void)
9395
/*
9496
* launch a set of daemons from a remote daemon
9597
*/
96-
static int remote_spawn(opal_buffer_t *launch)
98+
static int remote_spawn()
9799
{
98100
/* unused function in this mode */
99101
return ORTE_SUCCESS;

orte/mca/plm/plm.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* All rights reserved.
1313
* Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights
1414
* reserved.
15+
* Copyright (c) 2017 Research Organization for Information Science
16+
* and Technology (RIST). All rights reserved.
1517
* $COPYRIGHT$
1618
*
1719
* Additional copyrights may follow
@@ -63,7 +65,7 @@ typedef int (*orte_plm_base_module_spawn_fn_t)(orte_job_t *jdata);
6365
/*
6466
* Remote spawn - spawn called by a daemon to launch a process on its own
6567
*/
66-
typedef int (*orte_plm_base_module_remote_spawn_fn_t)(opal_buffer_t *launch);
68+
typedef int (*orte_plm_base_module_remote_spawn_fn_t)(void);
6769

6870
/*
6971
* Entry point to set the HNP name

orte/mca/plm/rsh/plm_rsh_module.c

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101

102102
static int rsh_init(void);
103103
static int rsh_launch(orte_job_t *jdata);
104-
static int remote_spawn(opal_buffer_t *launch);
104+
static int remote_spawn(void);
105105
static int rsh_terminate_orteds(void);
106106
static int rsh_finalize(void);
107107

@@ -784,7 +784,7 @@ static void ssh_child(int argc, char **argv)
784784
/*
785785
* launch a set of daemons from a remote daemon
786786
*/
787-
static int remote_spawn(opal_buffer_t *launch)
787+
static int remote_spawn()
788788
{
789789
int node_name_index1;
790790
int proc_vpid_index;
@@ -793,7 +793,6 @@ static int remote_spawn(opal_buffer_t *launch)
793793
int argc;
794794
int rc=ORTE_SUCCESS;
795795
bool failed_launch = true;
796-
orte_std_cntr_t n;
797796
orte_process_name_t target;
798797
orte_plm_rsh_caddy_t *caddy;
799798
orte_job_t *daemons;
@@ -808,23 +807,15 @@ static int remote_spawn(opal_buffer_t *launch)
808807
/* if we hit any errors, tell the HNP it was us */
809808
target.vpid = ORTE_PROC_MY_NAME->vpid;
810809

811-
if (NULL != launch) {
812-
/* extract the prefix from the launch buffer */
813-
n = 1;
814-
if (ORTE_SUCCESS != (rc = opal_dss.unpack(launch, &prefix, &n, OPAL_STRING))) {
815-
ORTE_ERROR_LOG(rc);
816-
goto cleanup;
817-
}
810+
/* check to see if enable-orterun-prefix-by-default was given - if
811+
* this is being done by a singleton, then orterun will not be there
812+
* to put the prefix in the app. So make sure we check to find it */
813+
if ((bool)ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT) {
814+
prefix = strdup(opal_install_dirs.prefix);
818815
} else {
819-
/* check to see if enable-orterun-prefix-by-default was given - if
820-
* this is being done by a singleton, then orterun will not be there
821-
* to put the prefix in the app. So make sure we check to find it */
822-
if ((bool)ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT) {
823-
prefix = strdup(opal_install_dirs.prefix);
824-
} else {
825-
prefix = NULL;
826-
}
816+
prefix = NULL;
827817
}
818+
828819
/* get the updated routing list */
829820
rtmod = orte_rml.get_routed(orte_coll_conduit);
830821
OBJ_CONSTRUCT(&coll, opal_list_t);
@@ -1180,24 +1171,8 @@ static void launch_daemons(int fd, short args, void *cbdata)
11801171

11811172
/* if we are tree launching, find our children and create the launch cmd */
11821173
if (!mca_plm_rsh_component.no_tree_spawn) {
1183-
orte_daemon_cmd_flag_t command = ORTE_DAEMON_TREE_SPAWN;
11841174
orte_job_t *jdatorted;
11851175

1186-
/* get the tree spawn buffer */
1187-
orte_tree_launch_cmd = OBJ_NEW(opal_buffer_t);
1188-
/* insert the tree_spawn cmd */
1189-
if (ORTE_SUCCESS != (rc = opal_dss.pack(orte_tree_launch_cmd, &command, 1, ORTE_DAEMON_CMD))) {
1190-
ORTE_ERROR_LOG(rc);
1191-
OBJ_RELEASE(orte_tree_launch_cmd);
1192-
goto cleanup;
1193-
}
1194-
/* pack the prefix since this will be needed by the next wave */
1195-
if (ORTE_SUCCESS != (rc = opal_dss.pack(orte_tree_launch_cmd, &prefix_dir, 1, OPAL_STRING))) {
1196-
ORTE_ERROR_LOG(rc);
1197-
OBJ_RELEASE(orte_tree_launch_cmd);
1198-
goto cleanup;
1199-
}
1200-
12011176
/* get the orted job data object */
12021177
if (NULL == (jdatorted = orte_get_job_data_object(ORTE_PROC_MY_NAME->jobid))) {
12031178
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);

orte/orted/orted_comm.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -341,22 +341,6 @@ void orte_daemon_recv(int status, orte_process_name_t* sender,
341341

342342
break;
343343

344-
/**** TREE_SPAWN ****/
345-
case ORTE_DAEMON_TREE_SPAWN:
346-
if (orte_debug_daemons_flag) {
347-
opal_output(0, "%s orted_cmd: received tree_spawn",
348-
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
349-
}
350-
/* if the PLM supports remote spawn, pass it all along */
351-
if (NULL != orte_plm.remote_spawn) {
352-
if (ORTE_SUCCESS != (ret = orte_plm.remote_spawn(buffer))) {
353-
ORTE_ERROR_LOG(ret);
354-
}
355-
} else {
356-
opal_output(0, "%s remote spawn is NULL!", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
357-
}
358-
break;
359-
360344
/**** EXIT COMMAND ****/
361345
case ORTE_DAEMON_EXIT_CMD:
362346
if (orte_debug_daemons_flag) {
@@ -1400,8 +1384,6 @@ static char *get_orted_comm_cmd_str(int command)
14001384
return strdup("ORTE_DAEMON_SIGNAL_LOCAL_PROCS");
14011385
case ORTE_DAEMON_ADD_LOCAL_PROCS:
14021386
return strdup("ORTE_DAEMON_ADD_LOCAL_PROCS");
1403-
case ORTE_DAEMON_TREE_SPAWN:
1404-
return strdup("ORTE_DAEMON_TREE_SPAWN");
14051387

14061388
case ORTE_DAEMON_HEARTBEAT_CMD:
14071389
return strdup("ORTE_DAEMON_HEARTBEAT_CMD");

orte/orted/orted_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ int orte_daemon(int argc, char *argv[])
982982
}
983983
if (NULL != orte_node_regex) {
984984
/* now launch any child daemons of ours */
985-
orte_plm.remote_spawn(orte_tree_launch_cmd);
985+
orte_plm.remote_spawn();
986986
}
987987
}
988988

@@ -1159,7 +1159,7 @@ static void node_regex_report(int status, orte_process_name_t* sender,
11591159
*active = false;
11601160

11611161
/* now launch any child daemons of ours */
1162-
orte_plm.remote_spawn(orte_tree_launch_cmd);
1162+
orte_plm.remote_spawn();
11631163

11641164
report_orted();
11651165
}

orte/runtime/orte_globals.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
1515
* All rights reserved.
1616
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
17-
* Copyright (c) 2014-2015 Research Organization for Information Science
17+
* Copyright (c) 2014-2017 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
1919
* Copyright (c) 2017 IBM Corporation. All rights reserved.
2020
* $COPYRIGHT$
@@ -136,8 +136,6 @@ int orte_timeout_usec_per_proc = -1;
136136
float orte_max_timeout = -1.0;
137137
orte_timer_t *orte_mpiexec_timeout = NULL;
138138

139-
opal_buffer_t *orte_tree_launch_cmd = NULL;
140-
141139
int orte_stack_trace_wait_timeout = 30;
142140

143141
/* global arrays for data storage */

orte/runtime/orte_globals.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* All rights reserved.
1616
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2017 IBM Corporation. All rights reserved.
18+
* Copyright (c) 2017 Research Organization for Information Science
19+
* and Technology (RIST). All rights reserved.
1820
* $COPYRIGHT$
1921
*
2022
* Additional copyrights may follow
@@ -517,7 +519,6 @@ ORTE_DECLSPEC extern int orte_startup_timeout;
517519
ORTE_DECLSPEC extern int orte_timeout_usec_per_proc;
518520
ORTE_DECLSPEC extern float orte_max_timeout;
519521
ORTE_DECLSPEC extern orte_timer_t *orte_mpiexec_timeout;
520-
ORTE_DECLSPEC extern opal_buffer_t *orte_tree_launch_cmd;
521522

522523
/* global arrays for data storage */
523524
ORTE_DECLSPEC extern opal_hash_table_t *orte_job_data;

0 commit comments

Comments
 (0)