Skip to content

Commit 88fbdf8

Browse files
author
rhc54
authored
Merge pull request #2492 from rhc54/topic/connect
Fix IOF when outputing to files - the remote orteds were failing to o…
2 parents 3a76a78 + dd491db commit 88fbdf8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

orte/mca/iof/orted/iof_orted.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ static int orted_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ta
152152
proct->name.jobid = dst_name->jobid;
153153
proct->name.vpid = dst_name->vpid;
154154
opal_list_append(&mca_iof_orted_component.procs, &proct->super);
155+
156+
SETUP:
155157
/* get the local jobdata for this proc */
156158
if (NULL == (jobdat = orte_get_job_data_object(proct->name.jobid))) {
157159
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
@@ -162,8 +164,6 @@ static int orted_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ta
162164
ORTE_ERROR_LOG(rc);
163165
return rc;
164166
}
165-
166-
SETUP:
167167
/* define a read event and activate it */
168168
if (src_tag & ORTE_IOF_STDOUT) {
169169
ORTE_IOF_READ_EVENT(&proct->revstdout, proct, fd, ORTE_IOF_STDOUT,

orte/mca/oob/tcp/oob_tcp_connection.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ void mca_oob_tcp_peer_try_connect(int fd, short args, void *cbdata)
191191
ORTE_NAME_PRINT(&(peer->name)), peer->sd);
192192

193193
addrlen = sizeof(struct sockaddr_in);
194+
peer->active_addr = NULL;
194195
OPAL_LIST_FOREACH(addr, &peer->addrs, mca_oob_tcp_addr_t) {
195196
opal_output_verbose(OOB_TCP_DEBUG_CONNECT, orte_oob_base_framework.framework_output,
196197
"%s orte_tcp_peer_try_connect: "
@@ -288,7 +289,7 @@ void mca_oob_tcp_peer_try_connect(int fd, short args, void *cbdata)
288289
/* no address succeeded, so we cannot reach this peer */
289290
peer->state = MCA_OOB_TCP_FAILED;
290291
host = orte_get_proc_hostname(&(peer->name));
291-
if (NULL == host) {
292+
if (NULL == host && NULL != peer->active_addr) {
292293
host = opal_net_get_hostname((struct sockaddr*)&(peer->active_addr->addr));
293294
}
294295
/* use an opal_output here instead of show_help as we may well

orte/orted/orted_submit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ int orte_submit_job(char *argv[], int *index,
900900
if (NULL != getenv("ORTE_TEST_DEBUGGER_ATTACH")) {
901901
char *evar;
902902
evar = getenv("ORTE_TEST_DEBUGGER_SLEEP");
903-
for (i=0; i < (int)jdata->num_apps; i++) {
903+
for (i=0; i < (orte_app_idx_t)jdata->num_apps; i++) {
904904
if (NULL != (app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, i))) {
905905
opal_setenv("ORTE_TEST_DEBUGGER_ATTACH", "1", true, &app->env);
906906
if (NULL != evar) {

0 commit comments

Comments
 (0)