101101
102102static int rsh_init (void );
103103static int rsh_launch (orte_job_t * jdata );
104- static int remote_spawn (opal_buffer_t * launch );
104+ static int remote_spawn (void );
105105static int rsh_terminate_orteds (void );
106106static int rsh_finalize (void );
107107
@@ -263,7 +263,8 @@ static int rsh_init(void)
263263static void rsh_wait_daemon (int sd , short flags , void * cbdata )
264264{
265265 orte_job_t * jdata ;
266- orte_plm_rsh_caddy_t * caddy = (orte_plm_rsh_caddy_t * )cbdata ;
266+ orte_wait_tracker_t * t2 = (orte_wait_tracker_t * )cbdata ;
267+ orte_plm_rsh_caddy_t * caddy = (orte_plm_rsh_caddy_t * )t2 -> cbdata ;
267268 orte_proc_t * daemon = caddy -> daemon ;
268269 char * rtmod ;
269270
@@ -272,6 +273,7 @@ static void rsh_wait_daemon(int sd, short flags, void *cbdata)
272273 * session attached, e.g., while debugging
273274 */
274275 OBJ_RELEASE (caddy );
276+ OBJ_RELEASE (t2 );
275277 return ;
276278 }
277279
@@ -325,7 +327,7 @@ static void rsh_wait_daemon(int sd, short flags, void *cbdata)
325327 opal_event_active (& launch_event , EV_WRITE , 1 );
326328 }
327329 /* cleanup */
328- OBJ_RELEASE (caddy );
330+ OBJ_RELEASE (t2 );
329331}
330332
331333static int setup_launch (int * argcptr , char * * * argvptr ,
@@ -782,7 +784,7 @@ static void ssh_child(int argc, char **argv)
782784/*
783785 * launch a set of daemons from a remote daemon
784786 */
785- static int remote_spawn (opal_buffer_t * launch )
787+ static int remote_spawn ()
786788{
787789 int node_name_index1 ;
788790 int proc_vpid_index ;
@@ -791,7 +793,6 @@ static int remote_spawn(opal_buffer_t *launch)
791793 int argc ;
792794 int rc = ORTE_SUCCESS ;
793795 bool failed_launch = true;
794- orte_std_cntr_t n ;
795796 orte_process_name_t target ;
796797 orte_plm_rsh_caddy_t * caddy ;
797798 orte_job_t * daemons ;
@@ -806,22 +807,13 @@ static int remote_spawn(opal_buffer_t *launch)
806807 /* if we hit any errors, tell the HNP it was us */
807808 target .vpid = ORTE_PROC_MY_NAME -> vpid ;
808809
809- if (NULL != launch ) {
810- /* extract the prefix from the launch buffer */
811- n = 1 ;
812- if (ORTE_SUCCESS != (rc = opal_dss .unpack (launch , & prefix , & n , OPAL_STRING ))) {
813- ORTE_ERROR_LOG (rc );
814- goto cleanup ;
815- }
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 );
816815 } else {
817- /* check to see if enable-orterun-prefix-by-default was given - if
818- * this is being done by a singleton, then orterun will not be there
819- * to put the prefix in the app. So make sure we check to find it */
820- if ((bool )ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT ) {
821- prefix = strdup (opal_install_dirs .prefix );
822- } else {
823- prefix = NULL ;
824- }
816+ prefix = NULL ;
825817 }
826818
827819 /* get the updated routing list */
@@ -1179,24 +1171,8 @@ static void launch_daemons(int fd, short args, void *cbdata)
11791171
11801172 /* if we are tree launching, find our children and create the launch cmd */
11811173 if (!mca_plm_rsh_component .no_tree_spawn ) {
1182- orte_daemon_cmd_flag_t command = ORTE_DAEMON_TREE_SPAWN ;
11831174 orte_job_t * jdatorted ;
11841175
1185- /* get the tree spawn buffer */
1186- orte_tree_launch_cmd = OBJ_NEW (opal_buffer_t );
1187- /* insert the tree_spawn cmd */
1188- if (ORTE_SUCCESS != (rc = opal_dss .pack (orte_tree_launch_cmd , & command , 1 , ORTE_DAEMON_CMD ))) {
1189- ORTE_ERROR_LOG (rc );
1190- OBJ_RELEASE (orte_tree_launch_cmd );
1191- goto cleanup ;
1192- }
1193- /* pack the prefix since this will be needed by the next wave */
1194- if (ORTE_SUCCESS != (rc = opal_dss .pack (orte_tree_launch_cmd , & prefix_dir , 1 , OPAL_STRING ))) {
1195- ORTE_ERROR_LOG (rc );
1196- OBJ_RELEASE (orte_tree_launch_cmd );
1197- goto cleanup ;
1198- }
1199-
12001176 /* get the orted job data object */
12011177 if (NULL == (jdatorted = orte_get_job_data_object (ORTE_PROC_MY_NAME -> jobid ))) {
12021178 ORTE_ERROR_LOG (ORTE_ERR_NOT_FOUND );
0 commit comments