2012-06-11 17:16:02 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2007-2011 Los Alamos National Security, LLC.
|
2015-06-23 20:59:57 -07:00
|
|
|
* All rights reserved.
|
2012-06-11 17:16:02 +00:00
|
|
|
* Copyright (c) 2004-2011 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2017-04-04 19:03:28 -07:00
|
|
|
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
|
2012-06-11 17:16:02 +00:00
|
|
|
* $COPYRIGHT$
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2012-06-11 17:16:02 +00:00
|
|
|
* Additional copyrights may follow
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2012-06-11 17:16:02 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
#include "orte/constants.h"
|
|
|
|
|
2014-06-17 17:57:51 +00:00
|
|
|
#include "opal/dss/dss.h"
|
2012-06-11 17:16:02 +00:00
|
|
|
#include "opal/util/output.h"
|
|
|
|
|
|
|
|
#include "orte/mca/errmgr/errmgr.h"
|
|
|
|
#include "orte/mca/rml/rml.h"
|
|
|
|
#include "orte/util/name_fns.h"
|
|
|
|
#include "orte/util/proc_info.h"
|
|
|
|
#include "orte/runtime/orte_globals.h"
|
|
|
|
#include "orte/runtime/data_type_support/orte_dt_support.h"
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
#include "orte/runtime/orte_wait.h"
|
2012-06-11 17:16:02 +00:00
|
|
|
|
|
|
|
#include "orte/mca/rml/base/rml_contact.h"
|
|
|
|
|
|
|
|
#include "orte/mca/routed/base/base.h"
|
|
|
|
#include "routed_direct.h"
|
|
|
|
|
|
|
|
static int init(void);
|
|
|
|
static int finalize(void);
|
|
|
|
static int delete_route(orte_process_name_t *proc);
|
|
|
|
static int update_route(orte_process_name_t *target,
|
|
|
|
orte_process_name_t *route);
|
|
|
|
static orte_process_name_t get_route(orte_process_name_t *target);
|
|
|
|
static int route_lost(const orte_process_name_t *route);
|
|
|
|
static bool route_is_defined(const orte_process_name_t *target);
|
|
|
|
static void update_routing_plan(void);
|
Per the PMIx RFC:
WHAT: Merge the PMIx branch into the devel repo, creating a new
OPAL “lmix” framework to abstract PMI support for all RTEs.
Replace the ORTE daemon-level collectives with a new PMIx
server and update the ORTE grpcomm framework to support
server-to-server collectives
WHY: We’ve had problems dealing with variations in PMI implementations,
and need to extend the existing PMI definitions to meet exascale
requirements.
WHEN: Mon, Aug 25
WHERE: https://github.com/rhc54/ompi-svn-mirror.git
Several community members have been working on a refactoring of the current PMI support within OMPI. Although the APIs are common, Slurm and Cray implement a different range of capabilities, and package them differently. For example, Cray provides an integrated PMI-1/2 library, while Slurm separates the two and requires the user to specify the one to be used at runtime. In addition, several bugs in the Slurm implementations have caused problems requiring extra coding.
All this has led to a slew of #if’s in the PMI code and bugs when the corner-case logic for one implementation accidentally traps the other. Extending this support to other implementations would have increased this complexity to an unacceptable level.
Accordingly, we have:
* created a new OPAL “pmix” framework to abstract the PMI support, with separate components for Cray, Slurm PMI-1, and Slurm PMI-2 implementations.
* Replaced the current ORTE grpcomm daemon-based collective operation with an integrated PMIx server, and updated the grpcomm APIs to provide more flexible, multi-algorithm support for collective operations. At this time, only the xcast and allgather operations are supported.
* Replaced the current global collective id with a signature based on the names of the participating procs. The allows an unlimited number of collectives to be executed by any group of processes, subject to the requirement that only one collective can be active at a time for a unique combination of procs. Note that a proc can be involved in any number of simultaneous collectives - it is the specific combination of procs that is subject to the constraint
* removed the prior OMPI/OPAL modex code
* added new macros for executing modex send/recv to simplify use of the new APIs. The send macros allow the caller to specify whether or not the BTL supports async modex operations - if so, then the non-blocking “fence” operation is used, if the active PMIx component supports it. Otherwise, the default is a full blocking modex exchange as we currently perform.
* retained the current flag that directs us to use a blocking fence operation, but only to retrieve data upon demand
This commit was SVN r32570.
2014-08-21 18:56:47 +00:00
|
|
|
static void get_routing_list(opal_list_t *coll);
|
2012-06-11 17:16:02 +00:00
|
|
|
static int set_lifeline(orte_process_name_t *proc);
|
|
|
|
static size_t num_routes(void);
|
|
|
|
|
|
|
|
#if OPAL_ENABLE_FT_CR == 1
|
|
|
|
static int direct_ft_event(int state);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
orte_routed_module_t orte_routed_direct_module = {
|
2016-10-23 11:36:05 -07:00
|
|
|
.initialize = init,
|
|
|
|
.finalize = finalize,
|
|
|
|
.delete_route = delete_route,
|
|
|
|
.update_route = update_route,
|
|
|
|
.get_route = get_route,
|
|
|
|
.route_lost = route_lost,
|
|
|
|
.route_is_defined = route_is_defined,
|
|
|
|
.set_lifeline = set_lifeline,
|
|
|
|
.update_routing_plan = update_routing_plan,
|
|
|
|
.get_routing_list = get_routing_list,
|
|
|
|
.num_routes = num_routes,
|
2012-06-11 17:16:02 +00:00
|
|
|
#if OPAL_ENABLE_FT_CR == 1
|
2016-10-23 11:36:05 -07:00
|
|
|
.ft_event = direct_ft_event
|
2012-06-11 17:16:02 +00:00
|
|
|
#else
|
|
|
|
NULL
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
2015-01-30 11:00:43 -08:00
|
|
|
static orte_process_name_t mylifeline;
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
static orte_process_name_t *lifeline = NULL;
|
|
|
|
static opal_list_t my_children;
|
|
|
|
|
2012-06-11 17:16:02 +00:00
|
|
|
static int init(void)
|
|
|
|
{
|
2016-10-31 10:49:26 -07:00
|
|
|
lifeline = NULL;
|
|
|
|
|
|
|
|
if (ORTE_PROC_IS_DAEMON) {
|
2017-04-04 19:03:28 -07:00
|
|
|
ORTE_PROC_MY_PARENT->jobid = ORTE_PROC_MY_NAME->jobid;
|
2016-10-31 10:49:26 -07:00
|
|
|
/* if we are using static ports, set my lifeline to point at my parent */
|
|
|
|
if (orte_static_ports) {
|
2017-04-04 19:03:28 -07:00
|
|
|
/* we will have been given our parent's vpid by MCA param */
|
2016-10-31 10:49:26 -07:00
|
|
|
lifeline = ORTE_PROC_MY_PARENT;
|
|
|
|
} else {
|
|
|
|
/* set our lifeline to the HNP - we will abort if that connection is lost */
|
|
|
|
lifeline = ORTE_PROC_MY_HNP;
|
2017-04-04 19:03:28 -07:00
|
|
|
ORTE_PROC_MY_PARENT->vpid = 0;
|
2016-10-31 10:49:26 -07:00
|
|
|
}
|
|
|
|
} else if (ORTE_PROC_IS_APP) {
|
|
|
|
/* if we don't have a designated daemon, just
|
|
|
|
* disqualify ourselves */
|
|
|
|
if (NULL == orte_process_info.my_daemon_uri) {
|
|
|
|
return ORTE_ERR_TAKE_NEXT_OPTION;
|
|
|
|
}
|
|
|
|
/* set our lifeline to the local daemon - we will abort if this connection is lost */
|
|
|
|
lifeline = ORTE_PROC_MY_DAEMON;
|
|
|
|
orte_routing_is_enabled = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* setup the list of children */
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
OBJ_CONSTRUCT(&my_children, opal_list_t);
|
2016-10-31 10:49:26 -07:00
|
|
|
|
2012-06-11 17:16:02 +00:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int finalize(void)
|
|
|
|
{
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
OPAL_LIST_DESTRUCT(&my_children);
|
2012-06-11 17:16:02 +00:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int delete_route(orte_process_name_t *proc)
|
|
|
|
{
|
2013-03-27 21:14:43 +00:00
|
|
|
OPAL_OUTPUT_VERBOSE((1, orte_routed_base_framework.framework_output,
|
2012-06-11 17:16:02 +00:00
|
|
|
"%s routed_direct_delete_route for %s",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
|
|
|
ORTE_NAME_PRINT(proc)));
|
2015-06-23 20:59:57 -07:00
|
|
|
|
2012-06-11 17:16:02 +00:00
|
|
|
/*There is nothing to do here */
|
2015-06-23 20:59:57 -07:00
|
|
|
|
2012-06-11 17:16:02 +00:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int update_route(orte_process_name_t *target,
|
|
|
|
orte_process_name_t *route)
|
2015-06-23 20:59:57 -07:00
|
|
|
{
|
2013-03-27 21:14:43 +00:00
|
|
|
OPAL_OUTPUT_VERBOSE((1, orte_routed_base_framework.framework_output,
|
2012-06-11 17:16:02 +00:00
|
|
|
"%s routed_direct_update: %s --> %s",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
2015-06-23 20:59:57 -07:00
|
|
|
ORTE_NAME_PRINT(target),
|
2012-06-11 17:16:02 +00:00
|
|
|
ORTE_NAME_PRINT(route)));
|
|
|
|
|
|
|
|
/*There is nothing to do here */
|
2015-06-23 20:59:57 -07:00
|
|
|
|
2012-06-11 17:16:02 +00:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static orte_process_name_t get_route(orte_process_name_t *target)
|
|
|
|
{
|
2014-12-05 12:38:59 +02:00
|
|
|
orte_process_name_t *ret, daemon;
|
2012-06-11 17:16:02 +00:00
|
|
|
|
|
|
|
if (target->jobid == ORTE_JOBID_INVALID ||
|
|
|
|
target->vpid == ORTE_VPID_INVALID) {
|
|
|
|
ret = ORTE_NAME_INVALID;
|
|
|
|
goto found;
|
|
|
|
}
|
|
|
|
|
2014-12-05 12:38:59 +02:00
|
|
|
/* initialize */
|
|
|
|
daemon.jobid = ORTE_PROC_MY_DAEMON->jobid;
|
|
|
|
daemon.vpid = ORTE_PROC_MY_DAEMON->vpid;
|
|
|
|
|
2014-11-26 13:36:49 +02:00
|
|
|
if (ORTE_PROC_IS_APP) {
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
/* if I am an application, AND I have knowledge of
|
|
|
|
* my daemon (i.e., a daemon launched me), then I
|
|
|
|
* always route thru the daemon */
|
|
|
|
if (NULL != orte_process_info.my_daemon_uri) {
|
|
|
|
ret = ORTE_PROC_MY_DAEMON;
|
|
|
|
} else {
|
|
|
|
/* I was direct launched and do not have
|
|
|
|
* a daemon, so I have to route direct */
|
|
|
|
ret = target;
|
|
|
|
}
|
2014-12-05 12:38:59 +02:00
|
|
|
goto found;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* if I am a tool, the route is direct if target is in
|
|
|
|
* my own job family, and to the target's HNP if not
|
|
|
|
*/
|
|
|
|
if (ORTE_PROC_IS_TOOL) {
|
|
|
|
if (ORTE_JOB_FAMILY(target->jobid) == ORTE_JOB_FAMILY(ORTE_PROC_MY_NAME->jobid)) {
|
|
|
|
ret = target;
|
|
|
|
goto found;
|
|
|
|
} else {
|
|
|
|
ORTE_HNP_NAME_FROM_JOB(&daemon, target->jobid);
|
|
|
|
ret = &daemon;
|
|
|
|
goto found;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/****** HNP AND DAEMONS ONLY ******/
|
|
|
|
if (OPAL_EQUAL == orte_util_compare_name_fields(ORTE_NS_CMP_ALL, ORTE_PROC_MY_HNP, target)) {
|
|
|
|
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_framework.framework_output,
|
|
|
|
"%s routing direct to the HNP",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
|
2014-11-26 13:36:49 +02:00
|
|
|
ret = ORTE_PROC_MY_HNP;
|
2014-12-05 12:38:59 +02:00
|
|
|
goto found;
|
|
|
|
}
|
|
|
|
|
|
|
|
daemon.jobid = ORTE_PROC_MY_NAME->jobid;
|
|
|
|
/* find out what daemon hosts this proc */
|
|
|
|
if (ORTE_VPID_INVALID == (daemon.vpid = orte_get_proc_daemon_vpid(target))) {
|
|
|
|
ret = ORTE_NAME_INVALID;
|
|
|
|
goto found;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* if the daemon is me, then send direct to the target! */
|
|
|
|
if (ORTE_PROC_MY_NAME->vpid == daemon.vpid) {
|
2014-11-26 13:36:49 +02:00
|
|
|
ret = target;
|
2014-12-05 12:38:59 +02:00
|
|
|
goto found;
|
2014-11-26 13:36:49 +02:00
|
|
|
}
|
2012-06-11 17:16:02 +00:00
|
|
|
|
2014-12-05 12:38:59 +02:00
|
|
|
/* else route to this daemon directly */
|
|
|
|
ret = &daemon;
|
|
|
|
|
2012-06-11 17:16:02 +00:00
|
|
|
found:
|
2013-03-27 21:14:43 +00:00
|
|
|
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_framework.framework_output,
|
2012-06-11 17:16:02 +00:00
|
|
|
"%s routed_direct_get(%s) --> %s",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
2014-12-05 12:38:59 +02:00
|
|
|
ORTE_NAME_PRINT(target),
|
2012-06-11 17:16:02 +00:00
|
|
|
ORTE_NAME_PRINT(ret)));
|
2014-12-05 12:38:59 +02:00
|
|
|
|
2012-06-11 17:16:02 +00:00
|
|
|
return *ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int route_lost(const orte_process_name_t *route)
|
|
|
|
{
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
opal_list_item_t *item;
|
|
|
|
orte_routed_tree_t *child;
|
|
|
|
|
|
|
|
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_framework.framework_output,
|
|
|
|
"%s route to %s lost",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
|
|
|
ORTE_NAME_PRINT(route)));
|
|
|
|
|
|
|
|
/* if we lose the connection to the lifeline and we are NOT already,
|
|
|
|
* in finalize, tell the OOB to abort.
|
|
|
|
* NOTE: we cannot call abort from here as the OOB needs to first
|
|
|
|
* release a thread-lock - otherwise, we will hang!!
|
|
|
|
*/
|
|
|
|
if (!orte_finalizing &&
|
|
|
|
NULL != lifeline &&
|
|
|
|
OPAL_EQUAL == orte_util_compare_name_fields(ORTE_NS_CMP_ALL, route, lifeline)) {
|
|
|
|
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_framework.framework_output,
|
|
|
|
"%s routed:direct: Connection to lifeline %s lost",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
|
|
|
ORTE_NAME_PRINT(lifeline)));
|
|
|
|
return ORTE_ERR_FATAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* if we are the HNP, and the route is a daemon,
|
|
|
|
* see if it is one of our children - if so, remove it
|
|
|
|
*/
|
|
|
|
if (ORTE_PROC_IS_HNP &&
|
|
|
|
route->jobid == ORTE_PROC_MY_NAME->jobid) {
|
|
|
|
for (item = opal_list_get_first(&my_children);
|
|
|
|
item != opal_list_get_end(&my_children);
|
|
|
|
item = opal_list_get_next(item)) {
|
|
|
|
child = (orte_routed_tree_t*)item;
|
|
|
|
if (child->vpid == route->vpid) {
|
|
|
|
opal_list_remove_item(&my_children, item);
|
|
|
|
OBJ_RELEASE(item);
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* we don't care about this one, so return success */
|
2012-06-11 17:16:02 +00:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static bool route_is_defined(const orte_process_name_t *target)
|
|
|
|
{
|
|
|
|
/* all routes are defined */
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int set_lifeline(orte_process_name_t *proc)
|
|
|
|
{
|
2015-01-30 11:00:43 -08:00
|
|
|
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_framework.framework_output,
|
|
|
|
"%s routed:direct: set lifeline to %s",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
|
|
|
ORTE_NAME_PRINT(proc)));
|
|
|
|
mylifeline = *proc;
|
|
|
|
lifeline = &mylifeline;
|
2012-06-11 17:16:02 +00:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void update_routing_plan(void)
|
|
|
|
{
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
orte_routed_tree_t *child;
|
2012-06-11 17:16:02 +00:00
|
|
|
int32_t i;
|
|
|
|
orte_job_t *jdata;
|
|
|
|
orte_proc_t *proc;
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
|
|
|
|
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_framework.framework_output,
|
|
|
|
"%s routed:direct: update routing plan",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
|
2015-06-23 20:59:57 -07:00
|
|
|
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
if (!ORTE_PROC_IS_HNP) {
|
|
|
|
/* nothing to do */
|
2012-06-11 17:16:02 +00:00
|
|
|
return;
|
|
|
|
}
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
|
|
|
|
/* clear the current list */
|
|
|
|
OPAL_LIST_DESTRUCT(&my_children);
|
|
|
|
OBJ_CONSTRUCT(&my_children, opal_list_t);
|
2015-06-23 20:59:57 -07:00
|
|
|
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
/* HNP is directly connected to each daemon */
|
Per the PMIx RFC:
WHAT: Merge the PMIx branch into the devel repo, creating a new
OPAL “lmix” framework to abstract PMI support for all RTEs.
Replace the ORTE daemon-level collectives with a new PMIx
server and update the ORTE grpcomm framework to support
server-to-server collectives
WHY: We’ve had problems dealing with variations in PMI implementations,
and need to extend the existing PMI definitions to meet exascale
requirements.
WHEN: Mon, Aug 25
WHERE: https://github.com/rhc54/ompi-svn-mirror.git
Several community members have been working on a refactoring of the current PMI support within OMPI. Although the APIs are common, Slurm and Cray implement a different range of capabilities, and package them differently. For example, Cray provides an integrated PMI-1/2 library, while Slurm separates the two and requires the user to specify the one to be used at runtime. In addition, several bugs in the Slurm implementations have caused problems requiring extra coding.
All this has led to a slew of #if’s in the PMI code and bugs when the corner-case logic for one implementation accidentally traps the other. Extending this support to other implementations would have increased this complexity to an unacceptable level.
Accordingly, we have:
* created a new OPAL “pmix” framework to abstract the PMI support, with separate components for Cray, Slurm PMI-1, and Slurm PMI-2 implementations.
* Replaced the current ORTE grpcomm daemon-based collective operation with an integrated PMIx server, and updated the grpcomm APIs to provide more flexible, multi-algorithm support for collective operations. At this time, only the xcast and allgather operations are supported.
* Replaced the current global collective id with a signature based on the names of the participating procs. The allows an unlimited number of collectives to be executed by any group of processes, subject to the requirement that only one collective can be active at a time for a unique combination of procs. Note that a proc can be involved in any number of simultaneous collectives - it is the specific combination of procs that is subject to the constraint
* removed the prior OMPI/OPAL modex code
* added new macros for executing modex send/recv to simplify use of the new APIs. The send macros allow the caller to specify whether or not the BTL supports async modex operations - if so, then the non-blocking “fence” operation is used, if the active PMIx component supports it. Otherwise, the default is a full blocking modex exchange as we currently perform.
* retained the current flag that directs us to use a blocking fence operation, but only to retrieve data upon demand
This commit was SVN r32570.
2014-08-21 18:56:47 +00:00
|
|
|
if (NULL == (jdata = orte_get_job_data_object(ORTE_PROC_MY_NAME->jobid))) {
|
|
|
|
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
for (i=1; i < jdata->procs->size; i++) {
|
|
|
|
if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(jdata->procs, i))) {
|
|
|
|
continue;
|
2012-06-11 17:16:02 +00:00
|
|
|
}
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
child = OBJ_NEW(orte_routed_tree_t);
|
|
|
|
child->vpid = proc->name.vpid;
|
|
|
|
opal_list_append(&my_children, &child->super);
|
|
|
|
}
|
Per the PMIx RFC:
WHAT: Merge the PMIx branch into the devel repo, creating a new
OPAL “lmix” framework to abstract PMI support for all RTEs.
Replace the ORTE daemon-level collectives with a new PMIx
server and update the ORTE grpcomm framework to support
server-to-server collectives
WHY: We’ve had problems dealing with variations in PMI implementations,
and need to extend the existing PMI definitions to meet exascale
requirements.
WHEN: Mon, Aug 25
WHERE: https://github.com/rhc54/ompi-svn-mirror.git
Several community members have been working on a refactoring of the current PMI support within OMPI. Although the APIs are common, Slurm and Cray implement a different range of capabilities, and package them differently. For example, Cray provides an integrated PMI-1/2 library, while Slurm separates the two and requires the user to specify the one to be used at runtime. In addition, several bugs in the Slurm implementations have caused problems requiring extra coding.
All this has led to a slew of #if’s in the PMI code and bugs when the corner-case logic for one implementation accidentally traps the other. Extending this support to other implementations would have increased this complexity to an unacceptable level.
Accordingly, we have:
* created a new OPAL “pmix” framework to abstract the PMI support, with separate components for Cray, Slurm PMI-1, and Slurm PMI-2 implementations.
* Replaced the current ORTE grpcomm daemon-based collective operation with an integrated PMIx server, and updated the grpcomm APIs to provide more flexible, multi-algorithm support for collective operations. At this time, only the xcast and allgather operations are supported.
* Replaced the current global collective id with a signature based on the names of the participating procs. The allows an unlimited number of collectives to be executed by any group of processes, subject to the requirement that only one collective can be active at a time for a unique combination of procs. Note that a proc can be involved in any number of simultaneous collectives - it is the specific combination of procs that is subject to the constraint
* removed the prior OMPI/OPAL modex code
* added new macros for executing modex send/recv to simplify use of the new APIs. The send macros allow the caller to specify whether or not the BTL supports async modex operations - if so, then the non-blocking “fence” operation is used, if the active PMIx component supports it. Otherwise, the default is a full blocking modex exchange as we currently perform.
* retained the current flag that directs us to use a blocking fence operation, but only to retrieve data upon demand
This commit was SVN r32570.
2014-08-21 18:56:47 +00:00
|
|
|
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void get_routing_list(opal_list_t *coll)
|
|
|
|
{
|
2015-06-23 20:59:57 -07:00
|
|
|
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_framework.framework_output,
|
|
|
|
"%s routed:direct: get routing list",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
|
|
|
|
|
|
|
|
/* if I am anything other than daemons and the HNP, this
|
|
|
|
* is a meaningless command as I am not allowed to route
|
|
|
|
*/
|
|
|
|
if (!ORTE_PROC_IS_DAEMON && !ORTE_PROC_IS_HNP) {
|
|
|
|
return;
|
2012-06-11 17:16:02 +00:00
|
|
|
}
|
2015-06-23 20:59:57 -07:00
|
|
|
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
orte_routed_base_xcast_routing(coll, &my_children);
|
2012-06-11 17:16:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static size_t num_routes(void)
|
|
|
|
{
|
|
|
|
if (!ORTE_PROC_IS_HNP) {
|
|
|
|
return 0;
|
|
|
|
}
|
Get the direct routed component to work with both TCP and USOCK OOB components. We previously had setup the direct component so it would only support direct-launched applications. Thus, all routes went direct between processes. However, if the job had been launched by mpirun, this made no sense - what you wanted instead was to have each app proc talk directly to its daemon, but have the daemons all directly connect to each other.
So we need all the routing code for dealing with cross-job communications, lifelines, etc. The HNP will be directly connected to all daemons as they must callback at startup, and so we need to track those children correctly so we know when it is okay to terminate.
We still have to support direct launch, though, as this is the only component we can use in that scenario. So if the app doesn't have daemon URI info, then it must fall back to directly connecting to everything.
2014-12-05 15:33:40 -08:00
|
|
|
return opal_list_get_size(&my_children);
|
2012-06-11 17:16:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#if OPAL_ENABLE_FT_CR == 1
|
|
|
|
static int direct_ft_event(int state)
|
|
|
|
{
|
|
|
|
int ret, exit_status = ORTE_SUCCESS;
|
|
|
|
|
|
|
|
/******** Checkpoint Prep ********/
|
|
|
|
if(OPAL_CRS_CHECKPOINT == state) {
|
|
|
|
}
|
|
|
|
/******** Continue Recovery ********/
|
|
|
|
else if (OPAL_CRS_CONTINUE == state ) {
|
|
|
|
}
|
|
|
|
else if (OPAL_CRS_TERM == state ) {
|
|
|
|
/* Nothing */
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* Error state = Nothing */
|
|
|
|
}
|
|
|
|
|
|
|
|
cleanup:
|
|
|
|
return exit_status;
|
|
|
|
}
|
|
|
|
#endif
|