1
1

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 <gilles@rist.or.jp>
Этот коммит содержится в:
Gilles Gouaillardet 2017-12-21 17:30:45 +09:00
родитель 4527584840
Коммит 03da5218ea
8 изменённых файлов: 23 добавлений и 62 удалений

Просмотреть файл

@ -13,6 +13,8 @@
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -44,7 +46,6 @@ typedef uint8_t orte_daemon_cmd_flag_t;
#define ORTE_DAEMON_KILL_LOCAL_PROCS (orte_daemon_cmd_flag_t) 2
#define ORTE_DAEMON_SIGNAL_LOCAL_PROCS (orte_daemon_cmd_flag_t) 3
#define ORTE_DAEMON_ADD_LOCAL_PROCS (orte_daemon_cmd_flag_t) 4
#define ORTE_DAEMON_TREE_SPAWN (orte_daemon_cmd_flag_t) 5
#define ORTE_DAEMON_HEARTBEAT_CMD (orte_daemon_cmd_flag_t) 6
#define ORTE_DAEMON_EXIT_CMD (orte_daemon_cmd_flag_t) 7
#define ORTE_DAEMON_PROCESS_AND_RELAY_CMD (orte_daemon_cmd_flag_t) 9

Просмотреть файл

@ -15,6 +15,8 @@
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2011 IBM Corporation. All rights reserved.
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -50,7 +52,7 @@
static int isolated_init(void);
static int isolated_launch(orte_job_t *jdata);
static int remote_spawn(opal_buffer_t *launch);
static int remote_spawn();
static int isolated_terminate_orteds(void);
static int isolated_finalize(void);
@ -93,7 +95,7 @@ static int isolated_init(void)
/*
* launch a set of daemons from a remote daemon
*/
static int remote_spawn(opal_buffer_t *launch)
static int remote_spawn()
{
/* unused function in this mode */
return ORTE_SUCCESS;

Просмотреть файл

@ -12,6 +12,8 @@
* All rights reserved.
* Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -63,7 +65,7 @@ typedef int (*orte_plm_base_module_spawn_fn_t)(orte_job_t *jdata);
/*
* Remote spawn - spawn called by a daemon to launch a process on its own
*/
typedef int (*orte_plm_base_module_remote_spawn_fn_t)(opal_buffer_t *launch);
typedef int (*orte_plm_base_module_remote_spawn_fn_t)(void);
/*
* Entry point to set the HNP name

Просмотреть файл

@ -101,7 +101,7 @@
static int rsh_init(void);
static int rsh_launch(orte_job_t *jdata);
static int remote_spawn(opal_buffer_t *launch);
static int remote_spawn(void);
static int rsh_terminate_orteds(void);
static int rsh_finalize(void);
@ -784,7 +784,7 @@ static void ssh_child(int argc, char **argv)
/*
* launch a set of daemons from a remote daemon
*/
static int remote_spawn(opal_buffer_t *launch)
static int remote_spawn()
{
int node_name_index1;
int proc_vpid_index;
@ -793,7 +793,6 @@ static int remote_spawn(opal_buffer_t *launch)
int argc;
int rc=ORTE_SUCCESS;
bool failed_launch = true;
orte_std_cntr_t n;
orte_process_name_t target;
orte_plm_rsh_caddy_t *caddy;
orte_job_t *daemons;
@ -808,23 +807,15 @@ static int remote_spawn(opal_buffer_t *launch)
/* if we hit any errors, tell the HNP it was us */
target.vpid = ORTE_PROC_MY_NAME->vpid;
if (NULL != launch) {
/* extract the prefix from the launch buffer */
n = 1;
if (ORTE_SUCCESS != (rc = opal_dss.unpack(launch, &prefix, &n, OPAL_STRING))) {
ORTE_ERROR_LOG(rc);
goto cleanup;
}
/* check to see if enable-orterun-prefix-by-default was given - if
* this is being done by a singleton, then orterun will not be there
* to put the prefix in the app. So make sure we check to find it */
if ((bool)ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT) {
prefix = strdup(opal_install_dirs.prefix);
} else {
/* check to see if enable-orterun-prefix-by-default was given - if
* this is being done by a singleton, then orterun will not be there
* to put the prefix in the app. So make sure we check to find it */
if ((bool)ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT) {
prefix = strdup(opal_install_dirs.prefix);
} else {
prefix = NULL;
}
prefix = NULL;
}
/* get the updated routing list */
rtmod = orte_rml.get_routed(orte_coll_conduit);
OBJ_CONSTRUCT(&coll, opal_list_t);
@ -1180,24 +1171,8 @@ static void launch_daemons(int fd, short args, void *cbdata)
/* if we are tree launching, find our children and create the launch cmd */
if (!mca_plm_rsh_component.no_tree_spawn) {
orte_daemon_cmd_flag_t command = ORTE_DAEMON_TREE_SPAWN;
orte_job_t *jdatorted;
/* get the tree spawn buffer */
orte_tree_launch_cmd = OBJ_NEW(opal_buffer_t);
/* insert the tree_spawn cmd */
if (ORTE_SUCCESS != (rc = opal_dss.pack(orte_tree_launch_cmd, &command, 1, ORTE_DAEMON_CMD))) {
ORTE_ERROR_LOG(rc);
OBJ_RELEASE(orte_tree_launch_cmd);
goto cleanup;
}
/* pack the prefix since this will be needed by the next wave */
if (ORTE_SUCCESS != (rc = opal_dss.pack(orte_tree_launch_cmd, &prefix_dir, 1, OPAL_STRING))) {
ORTE_ERROR_LOG(rc);
OBJ_RELEASE(orte_tree_launch_cmd);
goto cleanup;
}
/* get the orted job data object */
if (NULL == (jdatorted = orte_get_job_data_object(ORTE_PROC_MY_NAME->jobid))) {
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);

Просмотреть файл

@ -341,22 +341,6 @@ void orte_daemon_recv(int status, orte_process_name_t* sender,
break;
/**** TREE_SPAWN ****/
case ORTE_DAEMON_TREE_SPAWN:
if (orte_debug_daemons_flag) {
opal_output(0, "%s orted_cmd: received tree_spawn",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
}
/* if the PLM supports remote spawn, pass it all along */
if (NULL != orte_plm.remote_spawn) {
if (ORTE_SUCCESS != (ret = orte_plm.remote_spawn(buffer))) {
ORTE_ERROR_LOG(ret);
}
} else {
opal_output(0, "%s remote spawn is NULL!", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
}
break;
/**** EXIT COMMAND ****/
case ORTE_DAEMON_EXIT_CMD:
if (orte_debug_daemons_flag) {
@ -1400,8 +1384,6 @@ static char *get_orted_comm_cmd_str(int command)
return strdup("ORTE_DAEMON_SIGNAL_LOCAL_PROCS");
case ORTE_DAEMON_ADD_LOCAL_PROCS:
return strdup("ORTE_DAEMON_ADD_LOCAL_PROCS");
case ORTE_DAEMON_TREE_SPAWN:
return strdup("ORTE_DAEMON_TREE_SPAWN");
case ORTE_DAEMON_HEARTBEAT_CMD:
return strdup("ORTE_DAEMON_HEARTBEAT_CMD");

Просмотреть файл

@ -982,7 +982,7 @@ int orte_daemon(int argc, char *argv[])
}
if (NULL != orte_node_regex) {
/* now launch any child daemons of ours */
orte_plm.remote_spawn(orte_tree_launch_cmd);
orte_plm.remote_spawn();
}
}
@ -1159,7 +1159,7 @@ static void node_regex_report(int status, orte_process_name_t* sender,
*active = false;
/* now launch any child daemons of ours */
orte_plm.remote_spawn(orte_tree_launch_cmd);
orte_plm.remote_spawn();
report_orted();
}

Просмотреть файл

@ -14,7 +14,7 @@
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2015 Research Organization for Information Science
* Copyright (c) 2014-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* $COPYRIGHT$
@ -136,8 +136,6 @@ int orte_timeout_usec_per_proc = -1;
float orte_max_timeout = -1.0;
orte_timer_t *orte_mpiexec_timeout = NULL;
opal_buffer_t *orte_tree_launch_cmd = NULL;
int orte_stack_trace_wait_timeout = 30;
/* global arrays for data storage */

Просмотреть файл

@ -15,6 +15,8 @@
* All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -517,7 +519,6 @@ ORTE_DECLSPEC extern int orte_startup_timeout;
ORTE_DECLSPEC extern int orte_timeout_usec_per_proc;
ORTE_DECLSPEC extern float orte_max_timeout;
ORTE_DECLSPEC extern orte_timer_t *orte_mpiexec_timeout;
ORTE_DECLSPEC extern opal_buffer_t *orte_tree_launch_cmd;
/* global arrays for data storage */
ORTE_DECLSPEC extern opal_hash_table_t *orte_job_data;