Skip to content

Commit 188880b

Browse files
author
Ralph Castain
committed
Since static ports are only used by ORTE if the runtime option is given,
there is no need for a configure option as well - so remove the --enable-orte-static-ports configure option. When decoding the daemon nidmap, mark new daemons as ALIVE by default - we will discover dead ones as we go. Signed-off-by: Ralph Castain <[email protected]>
1 parent da0c873 commit 188880b

File tree

5 files changed

+13
-37
lines changed

5 files changed

+13
-37
lines changed

config/orte_configure_options.m4

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dnl Copyright (c) 2009-2013 Los Alamos National Security, LLC. All rights
1717
dnl reserved.
1818
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
1919
dnl
20+
dnl Copyright (c) 2016 Intel, Inc. All rights reserved.
2021
dnl $COPYRIGHT$
2122
dnl
2223
dnl Additional copyrights may follow
@@ -53,19 +54,4 @@ AC_DEFINE_UNQUOTED([ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT],
5354
[Whether we want orterun to effect "--prefix $prefix" by default])
5455

5556

56-
AC_MSG_CHECKING([if want orte static ports])
57-
AC_ARG_ENABLE([orte-static-ports],
58-
[AC_HELP_STRING([--enable-orte-static-ports],
59-
[Enable orte static ports for tcp oob. (default: enabled)])])
60-
if test "$enable_orte_static_ports" = "no"; then
61-
AC_MSG_RESULT([no])
62-
orte_enable_static_ports=0
63-
else
64-
AC_MSG_RESULT([yes])
65-
orte_enable_static_ports=1
66-
fi
67-
AC_DEFINE_UNQUOTED([ORTE_ENABLE_STATIC_PORTS],
68-
[$orte_enable_static_ports],
69-
[Whether we want static ports enabled])
70-
7157
])dnl

orte/mca/ess/base/ess_base_std_orted.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -493,33 +493,29 @@ int orte_ess_base_orted_setup(char **hosts)
493493
goto error;
494494
}
495495

496-
#if ORTE_ENABLE_STATIC_PORTS
497496
/* if we are using static ports, then we need to setup
498497
* the daemon info so the RML can function properly
499498
* without requiring a wireup stage. This must be done
500499
* after we enable_comm as that function determines our
501500
* own port, which we need in order to construct the nidmap
502501
*/
503502
if (orte_static_ports) {
504-
/* define the routing tree so we know the pattern
505-
* if we are trying to setup common or static ports
506-
*/
507-
orte_routed.update_routing_plan(NULL);
508503
/* extract the node info from the environment and
509-
* build a nidmap from it
504+
* build a nidmap from it - this will update the
505+
* routing plan as well
510506
*/
511507
if (ORTE_SUCCESS != (ret = orte_util_build_daemon_nidmap(hosts))) {
512508
ORTE_ERROR_LOG(ret);
513509
error = "construct daemon map from static ports";
514510
goto error;
515511
}
512+
} else {
513+
/* be sure to update the routing tree so the initial "phone home"
514+
* to mpirun goes through the tree if static ports were enabled - still
515+
* need to do it anyway just to initialize things
516+
*/
517+
orte_routed.update_routing_plan(NULL);
516518
}
517-
#endif
518-
/* be sure to update the routing tree so the initial "phone home"
519-
* to mpirun goes through the tree if static ports were enabled - still
520-
* need to do it anyway just to initialize things
521-
*/
522-
orte_routed.update_routing_plan(NULL);
523519

524520
/* Now provide a chance for the PLM
525521
* to perform any module-specific init functions. This

orte/mca/oob/tcp/oob_tcp_component.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,10 @@ static int tcp_component_close(void)
195195

196196
return ORTE_SUCCESS;
197197
}
198-
#if ORTE_ENABLE_STATIC_PORTS
199198
static char *static_port_string;
200199
#if OPAL_ENABLE_IPV6
201200
static char *static_port_string6;
202201
#endif // OPAL_ENABLE_IPV6
203-
#endif // OPAL_ENABLE_STATIC_PORTS
204202

205203
static char *dyn_port_string;
206204
#if OPAL_ENABLE_IPV6
@@ -276,7 +274,6 @@ static int tcp_component_register(void)
276274
return ORTE_ERR_NOT_AVAILABLE;
277275
}
278276

279-
#if ORTE_ENABLE_STATIC_PORTS
280277
static_port_string = NULL;
281278
(void)mca_base_component_var_register(component, "static_ipv4_ports",
282279
"Static ports for daemons and procs (IPv4)",
@@ -322,7 +319,7 @@ static int tcp_component_register(void)
322319
orte_static_ports = true;
323320
}
324321
#endif // OPAL_ENABLE_IPV6
325-
#endif // OPAL_ENABLE_STATIC_PORTS
322+
326323
dyn_port_string = NULL;
327324
(void)mca_base_component_var_register(component, "dynamic_ipv4_ports",
328325
"Range of ports to be dynamically used by daemons and procs (IPv4)",

orte/util/nidmap.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* All rights reserved.
1313
* Copyright (c) 2012-2014 Los Alamos National Security, LLC.
1414
* All rights reserved.
15-
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved
15+
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
1616
* Copyright (c) 2014 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
1818
* $COPYRIGHT$
@@ -72,7 +72,6 @@
7272

7373
#include "orte/util/nidmap.h"
7474

75-
#if ORTE_ENABLE_STATIC_PORTS
7675
int orte_util_build_daemon_nidmap(char **nodes)
7776
{
7877
int i, num_nodes;
@@ -184,7 +183,6 @@ int orte_util_build_daemon_nidmap(char **nodes)
184183

185184
return rc;
186185
}
187-
#endif
188186

189187
int orte_util_encode_nodemap(opal_byte_object_t *boptr, bool update)
190188
{
@@ -290,6 +288,7 @@ int orte_util_decode_daemon_nodemap(opal_byte_object_t *bo)
290288
dptr = OBJ_NEW(orte_proc_t);
291289
dptr->name.jobid = ORTE_PROC_MY_NAME->jobid;
292290
dptr->name.vpid = vpid;
291+
ORTE_FLAG_SET(dptr, ORTE_PROC_FLAG_ALIVE); // assume the daemon is alive until discovered otherwise
293292
opal_pointer_array_set_item(daemons->procs, vpid, dptr);
294293
}
295294
if (NULL != node->daemon) {

orte/util/nidmap.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2014 Intel, Inc. All rights reserved.
12+
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -44,9 +44,7 @@ BEGIN_C_DECLS
4444
ORTE_DECLSPEC int orte_util_encode_nodemap(opal_byte_object_t *boptr, bool update);
4545
ORTE_DECLSPEC int orte_util_decode_daemon_nodemap(opal_byte_object_t *bo);
4646

47-
#if ORTE_ENABLE_STATIC_PORTS
4847
ORTE_DECLSPEC int orte_util_build_daemon_nidmap(char **nodes);
49-
#endif
5048

5149
END_C_DECLS
5250

0 commit comments

Comments
 (0)