2008-05-06 02:32:25 +04:00
|
|
|
/*
|
2011-06-24 00:38:02 +04:00
|
|
|
* Copyright (c) 2004-2011 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2012-06-11 23:59:53 +04:00
|
|
|
* Copyright (c) 2007-2012 Los Alamos National Security, LLC. All rights
|
2015-06-24 06:59:57 +03:00
|
|
|
* reserved.
|
2013-12-19 04:40:36 +04:00
|
|
|
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
2016-10-23 21:36:05 +03:00
|
|
|
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
2008-05-06 02:32:25 +04:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2008-05-06 02:32:25 +04:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2008-05-06 02:32:25 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
#include "orte/constants.h"
|
|
|
|
|
2010-07-20 08:22:45 +04:00
|
|
|
#include <stddef.h>
|
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
#include "opal/dss/dss.h"
|
2010-07-20 08:22:45 +04:00
|
|
|
#include "opal/class/opal_pointer_array.h"
|
2008-10-03 00:08:27 +04:00
|
|
|
#include "opal/class/opal_bitmap.h"
|
2008-05-06 02:32:25 +04:00
|
|
|
#include "opal/util/bit_ops.h"
|
2009-02-14 05:26:12 +03:00
|
|
|
#include "opal/util/output.h"
|
2008-05-06 02:32:25 +04:00
|
|
|
|
|
|
|
#include "orte/mca/errmgr/errmgr.h"
|
2008-11-01 00:10:00 +03:00
|
|
|
#include "orte/mca/ess/ess.h"
|
2008-05-06 02:32:25 +04:00
|
|
|
#include "orte/mca/rml/rml.h"
|
2009-02-14 05:26:12 +03:00
|
|
|
#include "orte/mca/rml/rml_types.h"
|
2008-05-06 02:32:25 +04:00
|
|
|
#include "orte/util/name_fns.h"
|
2011-06-24 00:38:02 +04:00
|
|
|
#include "orte/util/nidmap.h"
|
2008-05-06 02:32:25 +04:00
|
|
|
#include "orte/runtime/orte_globals.h"
|
|
|
|
#include "orte/runtime/orte_wait.h"
|
2008-06-18 07:15:56 +04:00
|
|
|
#include "orte/runtime/runtime.h"
|
2011-08-27 02:16:14 +04:00
|
|
|
#include "orte/runtime/data_type_support/orte_dt_support.h"
|
2008-05-06 02:32:25 +04:00
|
|
|
|
|
|
|
#include "orte/mca/rml/base/rml_contact.h"
|
|
|
|
|
|
|
|
#include "orte/mca/routed/base/base.h"
|
|
|
|
#include "routed_binomial.h"
|
|
|
|
|
|
|
|
static int init(void);
|
|
|
|
static int finalize(void);
|
2008-07-22 01:37:09 +04:00
|
|
|
static int delete_route(orte_process_name_t *proc);
|
2008-05-06 02:32:25 +04:00
|
|
|
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);
|
2012-04-06 18:23:13 +04:00
|
|
|
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 22:56:47 +04:00
|
|
|
static void get_routing_list(opal_list_t *coll);
|
2008-12-21 02:23:11 +03:00
|
|
|
static int set_lifeline(orte_process_name_t *proc);
|
2010-07-18 01:03:27 +04:00
|
|
|
static size_t num_routes(void);
|
2008-05-06 02:32:25 +04:00
|
|
|
|
2010-03-13 02:57:50 +03:00
|
|
|
#if OPAL_ENABLE_FT_CR == 1
|
2008-05-06 02:32:25 +04:00
|
|
|
static int binomial_ft_event(int state);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
orte_routed_module_t orte_routed_binomial_module = {
|
2016-10-23 21:36:05 +03: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,
|
2010-03-13 02:57:50 +03:00
|
|
|
#if OPAL_ENABLE_FT_CR == 1
|
2016-10-23 21:36:05 +03:00
|
|
|
.ft_event = binomial_ft_event
|
2008-05-06 02:32:25 +04:00
|
|
|
#else
|
|
|
|
NULL
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
/* local globals */
|
Repair the MPI-2 dynamic operations. This includes:
1. repair of the linear and direct routed modules
2. repair of the ompi/pubsub/orte module to correctly init routes to the ompi-server, and correctly handle failure to correctly parse the provided ompi-server URI
3. modification of orterun to accept both "file" and "FILE" for designating where the ompi-server URI is to be found - purely a convenience feature
4. resolution of a message ordering problem during the connect/accept handshake that allowed the "send-first" proc to attempt to send to the "recv-first" proc before the HNP had actually updated its routes.
Let this be a further reminder to all - message ordering is NOT guaranteed in the OOB
5. Repair the ompi/dpm/orte module to correctly init routes during connect/accept.
Reminder to all: messages sent to procs in another job family (i.e., started by a different mpirun) are ALWAYS routed through the respective HNPs. As per the comments in orte/routed, this is REQUIRED to maintain connect/accept (where only the root proc on each side is capable of init'ing the routes), allow communication between mpirun's using different routing modules, and to minimize connections on tools such as ompi-server. It is all taken care of "under the covers" by the OOB to ensure that a route back to the sender is maintained, even when the different mpirun's are using different routed modules.
6. corrections in the orte/odls to ensure proper identification of daemons participating in a dynamic launch
7. corrections in build/nidmap to support update of an existing nidmap during dynamic launch
8. corrected implementation of the update_arch function in the ESS, along with consolidation of a number of ESS operations into base functions for easier maintenance. The ability to support info from multiple jobs was added, although we don't currently do so - this will come later to support further fault recovery strategies
9. minor updates to several functions to remove unnecessary and/or no longer used variables and envar's, add some debugging output, etc.
10. addition of a new macro ORTE_PROC_IS_DAEMON that resolves to true if the provided proc is a daemon
There is still more cleanup to be done for efficiency, but this at least works.
Tested on single-node Mac, multi-node SLURM via odin. Tests included connect/accept, publish/lookup/unpublish, comm_spawn, comm_spawn_multiple, and singleton comm_spawn.
Fixes ticket #1256
This commit was SVN r18804.
2008-07-03 21:53:37 +04:00
|
|
|
static orte_process_name_t *lifeline=NULL;
|
2008-12-21 02:23:11 +03:00
|
|
|
static orte_process_name_t local_lifeline;
|
Repair the MPI-2 dynamic operations. This includes:
1. repair of the linear and direct routed modules
2. repair of the ompi/pubsub/orte module to correctly init routes to the ompi-server, and correctly handle failure to correctly parse the provided ompi-server URI
3. modification of orterun to accept both "file" and "FILE" for designating where the ompi-server URI is to be found - purely a convenience feature
4. resolution of a message ordering problem during the connect/accept handshake that allowed the "send-first" proc to attempt to send to the "recv-first" proc before the HNP had actually updated its routes.
Let this be a further reminder to all - message ordering is NOT guaranteed in the OOB
5. Repair the ompi/dpm/orte module to correctly init routes during connect/accept.
Reminder to all: messages sent to procs in another job family (i.e., started by a different mpirun) are ALWAYS routed through the respective HNPs. As per the comments in orte/routed, this is REQUIRED to maintain connect/accept (where only the root proc on each side is capable of init'ing the routes), allow communication between mpirun's using different routing modules, and to minimize connections on tools such as ompi-server. It is all taken care of "under the covers" by the OOB to ensure that a route back to the sender is maintained, even when the different mpirun's are using different routed modules.
6. corrections in the orte/odls to ensure proper identification of daemons participating in a dynamic launch
7. corrections in build/nidmap to support update of an existing nidmap during dynamic launch
8. corrected implementation of the update_arch function in the ESS, along with consolidation of a number of ESS operations into base functions for easier maintenance. The ability to support info from multiple jobs was added, although we don't currently do so - this will come later to support further fault recovery strategies
9. minor updates to several functions to remove unnecessary and/or no longer used variables and envar's, add some debugging output, etc.
10. addition of a new macro ORTE_PROC_IS_DAEMON that resolves to true if the provided proc is a daemon
There is still more cleanup to be done for efficiency, but this at least works.
Tested on single-node Mac, multi-node SLURM via odin. Tests included connect/accept, publish/lookup/unpublish, comm_spawn, comm_spawn_multiple, and singleton comm_spawn.
Fixes ticket #1256
This commit was SVN r18804.
2008-07-03 21:53:37 +04:00
|
|
|
static int num_children;
|
|
|
|
static opal_list_t my_children;
|
2011-11-26 06:33:05 +04:00
|
|
|
static bool hnp_direct=true;
|
2008-05-06 02:32:25 +04:00
|
|
|
|
|
|
|
static int init(void)
|
|
|
|
{
|
|
|
|
lifeline = NULL;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2016-10-31 20:49:26 +03:00
|
|
|
if (ORTE_PROC_IS_DAEMON) {
|
|
|
|
/* if we are using static ports, set my lifeline to point at my parent */
|
|
|
|
if (orte_static_ports) {
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
ORTE_PROC_MY_PARENT->jobid = ORTE_PROC_MY_NAME->jobid;
|
|
|
|
} 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;
|
|
|
|
}
|
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
/* setup the list of children */
|
|
|
|
OBJ_CONSTRUCT(&my_children, opal_list_t);
|
|
|
|
num_children = 0;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int finalize(void)
|
|
|
|
{
|
|
|
|
opal_list_item_t *item;
|
2010-07-20 08:22:45 +04:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
lifeline = NULL;
|
|
|
|
|
|
|
|
/* deconstruct the list of children */
|
|
|
|
while (NULL != (item = opal_list_remove_first(&my_children))) {
|
|
|
|
OBJ_RELEASE(item);
|
|
|
|
}
|
|
|
|
OBJ_DESTRUCT(&my_children);
|
|
|
|
num_children = 0;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2008-07-22 01:37:09 +04:00
|
|
|
static int delete_route(orte_process_name_t *proc)
|
|
|
|
{
|
2011-10-13 00:18:57 +04:00
|
|
|
if (proc->jobid == ORTE_JOBID_INVALID ||
|
|
|
|
proc->vpid == ORTE_VPID_INVALID) {
|
2008-07-22 01:37:09 +04:00
|
|
|
return ORTE_ERR_BAD_PARAM;
|
|
|
|
}
|
2011-10-13 00:18:57 +04:00
|
|
|
|
2008-07-22 01:37:09 +04:00
|
|
|
/* if I am an application process, I don't have any routes
|
|
|
|
* so there is nothing for me to do
|
|
|
|
*/
|
2009-05-04 15:07:40 +04:00
|
|
|
if (!ORTE_PROC_IS_HNP && !ORTE_PROC_IS_DAEMON &&
|
|
|
|
!ORTE_PROC_IS_TOOL) {
|
2008-07-22 01:37:09 +04:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((1, orte_routed_base_framework.framework_output,
|
2008-07-22 01:37:09 +04:00
|
|
|
"%s routed_binomial_delete_route for %s",
|
2009-03-06 00:50:47 +03:00
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
|
|
|
ORTE_NAME_PRINT(proc)));
|
2015-06-24 06:59:57 +03:00
|
|
|
|
|
|
|
|
2008-11-01 00:10:00 +03:00
|
|
|
/* THIS CAME FROM OUR OWN JOB FAMILY...there is nothing
|
|
|
|
* to do here. The routes will be redefined when we update
|
|
|
|
* the routing tree
|
2008-07-22 01:37:09 +04:00
|
|
|
*/
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-11-01 00:10:00 +03:00
|
|
|
return ORTE_SUCCESS;
|
2008-07-22 01:37:09 +04:00
|
|
|
}
|
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
static int update_route(orte_process_name_t *target,
|
|
|
|
orte_process_name_t *route)
|
2015-06-24 06:59:57 +03:00
|
|
|
{
|
2011-10-13 00:18:57 +04:00
|
|
|
if (target->jobid == ORTE_JOBID_INVALID ||
|
|
|
|
target->vpid == ORTE_VPID_INVALID) {
|
2008-05-06 02:32:25 +04:00
|
|
|
return ORTE_ERR_BAD_PARAM;
|
|
|
|
}
|
|
|
|
|
Repair the MPI-2 dynamic operations. This includes:
1. repair of the linear and direct routed modules
2. repair of the ompi/pubsub/orte module to correctly init routes to the ompi-server, and correctly handle failure to correctly parse the provided ompi-server URI
3. modification of orterun to accept both "file" and "FILE" for designating where the ompi-server URI is to be found - purely a convenience feature
4. resolution of a message ordering problem during the connect/accept handshake that allowed the "send-first" proc to attempt to send to the "recv-first" proc before the HNP had actually updated its routes.
Let this be a further reminder to all - message ordering is NOT guaranteed in the OOB
5. Repair the ompi/dpm/orte module to correctly init routes during connect/accept.
Reminder to all: messages sent to procs in another job family (i.e., started by a different mpirun) are ALWAYS routed through the respective HNPs. As per the comments in orte/routed, this is REQUIRED to maintain connect/accept (where only the root proc on each side is capable of init'ing the routes), allow communication between mpirun's using different routing modules, and to minimize connections on tools such as ompi-server. It is all taken care of "under the covers" by the OOB to ensure that a route back to the sender is maintained, even when the different mpirun's are using different routed modules.
6. corrections in the orte/odls to ensure proper identification of daemons participating in a dynamic launch
7. corrections in build/nidmap to support update of an existing nidmap during dynamic launch
8. corrected implementation of the update_arch function in the ESS, along with consolidation of a number of ESS operations into base functions for easier maintenance. The ability to support info from multiple jobs was added, although we don't currently do so - this will come later to support further fault recovery strategies
9. minor updates to several functions to remove unnecessary and/or no longer used variables and envar's, add some debugging output, etc.
10. addition of a new macro ORTE_PROC_IS_DAEMON that resolves to true if the provided proc is a daemon
There is still more cleanup to be done for efficiency, but this at least works.
Tested on single-node Mac, multi-node SLURM via odin. Tests included connect/accept, publish/lookup/unpublish, comm_spawn, comm_spawn_multiple, and singleton comm_spawn.
Fixes ticket #1256
This commit was SVN r18804.
2008-07-03 21:53:37 +04:00
|
|
|
/* if I am an application process, we don't update the route since
|
|
|
|
* we automatically route everything through the local daemon
|
|
|
|
*/
|
2009-05-11 18:11:44 +04:00
|
|
|
if (ORTE_PROC_IS_APP) {
|
Repair the MPI-2 dynamic operations. This includes:
1. repair of the linear and direct routed modules
2. repair of the ompi/pubsub/orte module to correctly init routes to the ompi-server, and correctly handle failure to correctly parse the provided ompi-server URI
3. modification of orterun to accept both "file" and "FILE" for designating where the ompi-server URI is to be found - purely a convenience feature
4. resolution of a message ordering problem during the connect/accept handshake that allowed the "send-first" proc to attempt to send to the "recv-first" proc before the HNP had actually updated its routes.
Let this be a further reminder to all - message ordering is NOT guaranteed in the OOB
5. Repair the ompi/dpm/orte module to correctly init routes during connect/accept.
Reminder to all: messages sent to procs in another job family (i.e., started by a different mpirun) are ALWAYS routed through the respective HNPs. As per the comments in orte/routed, this is REQUIRED to maintain connect/accept (where only the root proc on each side is capable of init'ing the routes), allow communication between mpirun's using different routing modules, and to minimize connections on tools such as ompi-server. It is all taken care of "under the covers" by the OOB to ensure that a route back to the sender is maintained, even when the different mpirun's are using different routed modules.
6. corrections in the orte/odls to ensure proper identification of daemons participating in a dynamic launch
7. corrections in build/nidmap to support update of an existing nidmap during dynamic launch
8. corrected implementation of the update_arch function in the ESS, along with consolidation of a number of ESS operations into base functions for easier maintenance. The ability to support info from multiple jobs was added, although we don't currently do so - this will come later to support further fault recovery strategies
9. minor updates to several functions to remove unnecessary and/or no longer used variables and envar's, add some debugging output, etc.
10. addition of a new macro ORTE_PROC_IS_DAEMON that resolves to true if the provided proc is a daemon
There is still more cleanup to be done for efficiency, but this at least works.
Tested on single-node Mac, multi-node SLURM via odin. Tests included connect/accept, publish/lookup/unpublish, comm_spawn, comm_spawn_multiple, and singleton comm_spawn.
Fixes ticket #1256
This commit was SVN r18804.
2008-07-03 21:53:37 +04:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((1, orte_routed_base_framework.framework_output,
|
2008-05-06 02:32:25 +04:00
|
|
|
"%s routed_binomial_update: %s --> %s",
|
2009-03-06 00:50:47 +03:00
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
2015-06-24 06:59:57 +03:00
|
|
|
ORTE_NAME_PRINT(target),
|
2009-03-06 00:50:47 +03:00
|
|
|
ORTE_NAME_PRINT(route)));
|
2008-05-06 02:32:25 +04:00
|
|
|
|
|
|
|
|
2011-11-26 06:33:05 +04:00
|
|
|
/* if I am a daemon and the target is my HNP, then check
|
|
|
|
* the route - if it isn't direct, then we just flag that
|
|
|
|
* we have a route to the HNP
|
|
|
|
*/
|
|
|
|
if (OPAL_EQUAL == orte_util_compare_name_fields(ORTE_NS_CMP_ALL, ORTE_PROC_MY_HNP, target) &&
|
|
|
|
OPAL_EQUAL != orte_util_compare_name_fields(ORTE_NS_CMP_ALL, ORTE_PROC_MY_HNP, route)) {
|
|
|
|
hnp_direct = false;
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2013-12-19 04:40:36 +04:00
|
|
|
return ORTE_SUCCESS;
|
2008-05-06 02:32:25 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static orte_process_name_t get_route(orte_process_name_t *target)
|
|
|
|
{
|
2008-11-01 00:10:00 +03:00
|
|
|
orte_process_name_t *ret, daemon;
|
2009-05-11 18:11:44 +04:00
|
|
|
opal_list_item_t *item;
|
|
|
|
orte_routed_tree_t *child;
|
2008-05-06 02:32:25 +04:00
|
|
|
|
2011-12-15 19:32:09 +04:00
|
|
|
if (!orte_routing_is_enabled) {
|
|
|
|
ret = target;
|
|
|
|
goto found;
|
|
|
|
}
|
|
|
|
|
2011-07-24 00:19:43 +04:00
|
|
|
/* initialize */
|
|
|
|
daemon.jobid = ORTE_PROC_MY_DAEMON->jobid;
|
|
|
|
daemon.vpid = ORTE_PROC_MY_DAEMON->vpid;
|
|
|
|
|
2011-08-27 02:16:14 +04:00
|
|
|
if (target->jobid == ORTE_JOBID_INVALID ||
|
|
|
|
target->vpid == ORTE_VPID_INVALID) {
|
Repair the MPI-2 dynamic operations. This includes:
1. repair of the linear and direct routed modules
2. repair of the ompi/pubsub/orte module to correctly init routes to the ompi-server, and correctly handle failure to correctly parse the provided ompi-server URI
3. modification of orterun to accept both "file" and "FILE" for designating where the ompi-server URI is to be found - purely a convenience feature
4. resolution of a message ordering problem during the connect/accept handshake that allowed the "send-first" proc to attempt to send to the "recv-first" proc before the HNP had actually updated its routes.
Let this be a further reminder to all - message ordering is NOT guaranteed in the OOB
5. Repair the ompi/dpm/orte module to correctly init routes during connect/accept.
Reminder to all: messages sent to procs in another job family (i.e., started by a different mpirun) are ALWAYS routed through the respective HNPs. As per the comments in orte/routed, this is REQUIRED to maintain connect/accept (where only the root proc on each side is capable of init'ing the routes), allow communication between mpirun's using different routing modules, and to minimize connections on tools such as ompi-server. It is all taken care of "under the covers" by the OOB to ensure that a route back to the sender is maintained, even when the different mpirun's are using different routed modules.
6. corrections in the orte/odls to ensure proper identification of daemons participating in a dynamic launch
7. corrections in build/nidmap to support update of an existing nidmap during dynamic launch
8. corrected implementation of the update_arch function in the ESS, along with consolidation of a number of ESS operations into base functions for easier maintenance. The ability to support info from multiple jobs was added, although we don't currently do so - this will come later to support further fault recovery strategies
9. minor updates to several functions to remove unnecessary and/or no longer used variables and envar's, add some debugging output, etc.
10. addition of a new macro ORTE_PROC_IS_DAEMON that resolves to true if the provided proc is a daemon
There is still more cleanup to be done for efficiency, but this at least works.
Tested on single-node Mac, multi-node SLURM via odin. Tests included connect/accept, publish/lookup/unpublish, comm_spawn, comm_spawn_multiple, and singleton comm_spawn.
Fixes ticket #1256
This commit was SVN r18804.
2008-07-03 21:53:37 +04:00
|
|
|
ret = ORTE_NAME_INVALID;
|
|
|
|
goto found;
|
|
|
|
}
|
2011-06-24 00:38:02 +04:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
/* if it is me, then the route is just direct */
|
|
|
|
if (OPAL_EQUAL == opal_dss.compare(ORTE_PROC_MY_NAME, target, ORTE_NAME)) {
|
|
|
|
ret = target;
|
|
|
|
goto found;
|
|
|
|
}
|
2015-06-24 06:59:57 +03:00
|
|
|
|
Repair the MPI-2 dynamic operations. This includes:
1. repair of the linear and direct routed modules
2. repair of the ompi/pubsub/orte module to correctly init routes to the ompi-server, and correctly handle failure to correctly parse the provided ompi-server URI
3. modification of orterun to accept both "file" and "FILE" for designating where the ompi-server URI is to be found - purely a convenience feature
4. resolution of a message ordering problem during the connect/accept handshake that allowed the "send-first" proc to attempt to send to the "recv-first" proc before the HNP had actually updated its routes.
Let this be a further reminder to all - message ordering is NOT guaranteed in the OOB
5. Repair the ompi/dpm/orte module to correctly init routes during connect/accept.
Reminder to all: messages sent to procs in another job family (i.e., started by a different mpirun) are ALWAYS routed through the respective HNPs. As per the comments in orte/routed, this is REQUIRED to maintain connect/accept (where only the root proc on each side is capable of init'ing the routes), allow communication between mpirun's using different routing modules, and to minimize connections on tools such as ompi-server. It is all taken care of "under the covers" by the OOB to ensure that a route back to the sender is maintained, even when the different mpirun's are using different routed modules.
6. corrections in the orte/odls to ensure proper identification of daemons participating in a dynamic launch
7. corrections in build/nidmap to support update of an existing nidmap during dynamic launch
8. corrected implementation of the update_arch function in the ESS, along with consolidation of a number of ESS operations into base functions for easier maintenance. The ability to support info from multiple jobs was added, although we don't currently do so - this will come later to support further fault recovery strategies
9. minor updates to several functions to remove unnecessary and/or no longer used variables and envar's, add some debugging output, etc.
10. addition of a new macro ORTE_PROC_IS_DAEMON that resolves to true if the provided proc is a daemon
There is still more cleanup to be done for efficiency, but this at least works.
Tested on single-node Mac, multi-node SLURM via odin. Tests included connect/accept, publish/lookup/unpublish, comm_spawn, comm_spawn_multiple, and singleton comm_spawn.
Fixes ticket #1256
This commit was SVN r18804.
2008-07-03 21:53:37 +04:00
|
|
|
/* if I am an application process, always route via my local daemon */
|
2009-05-11 18:11:44 +04:00
|
|
|
if (ORTE_PROC_IS_APP) {
|
Repair the MPI-2 dynamic operations. This includes:
1. repair of the linear and direct routed modules
2. repair of the ompi/pubsub/orte module to correctly init routes to the ompi-server, and correctly handle failure to correctly parse the provided ompi-server URI
3. modification of orterun to accept both "file" and "FILE" for designating where the ompi-server URI is to be found - purely a convenience feature
4. resolution of a message ordering problem during the connect/accept handshake that allowed the "send-first" proc to attempt to send to the "recv-first" proc before the HNP had actually updated its routes.
Let this be a further reminder to all - message ordering is NOT guaranteed in the OOB
5. Repair the ompi/dpm/orte module to correctly init routes during connect/accept.
Reminder to all: messages sent to procs in another job family (i.e., started by a different mpirun) are ALWAYS routed through the respective HNPs. As per the comments in orte/routed, this is REQUIRED to maintain connect/accept (where only the root proc on each side is capable of init'ing the routes), allow communication between mpirun's using different routing modules, and to minimize connections on tools such as ompi-server. It is all taken care of "under the covers" by the OOB to ensure that a route back to the sender is maintained, even when the different mpirun's are using different routed modules.
6. corrections in the orte/odls to ensure proper identification of daemons participating in a dynamic launch
7. corrections in build/nidmap to support update of an existing nidmap during dynamic launch
8. corrected implementation of the update_arch function in the ESS, along with consolidation of a number of ESS operations into base functions for easier maintenance. The ability to support info from multiple jobs was added, although we don't currently do so - this will come later to support further fault recovery strategies
9. minor updates to several functions to remove unnecessary and/or no longer used variables and envar's, add some debugging output, etc.
10. addition of a new macro ORTE_PROC_IS_DAEMON that resolves to true if the provided proc is a daemon
There is still more cleanup to be done for efficiency, but this at least works.
Tested on single-node Mac, multi-node SLURM via odin. Tests included connect/accept, publish/lookup/unpublish, comm_spawn, comm_spawn_multiple, and singleton comm_spawn.
Fixes ticket #1256
This commit was SVN r18804.
2008-07-03 21:53:37 +04:00
|
|
|
ret = ORTE_PROC_MY_DAEMON;
|
|
|
|
goto found;
|
|
|
|
}
|
|
|
|
|
2011-03-05 20:12:46 +03:00
|
|
|
/* 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
|
|
|
|
*/
|
2009-05-11 18:11:44 +04:00
|
|
|
if (ORTE_PROC_IS_TOOL) {
|
2011-03-05 20:12:46 +03:00
|
|
|
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;
|
|
|
|
}
|
2009-05-11 18:11:44 +04:00
|
|
|
}
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-11-01 00:10:00 +03:00
|
|
|
/****** HNP AND DAEMONS ONLY ******/
|
2011-07-14 02:49:56 +04:00
|
|
|
if (OPAL_EQUAL == orte_util_compare_name_fields(ORTE_NS_CMP_ALL, ORTE_PROC_MY_HNP, target)) {
|
2013-03-20 19:07:43 +04:00
|
|
|
if (!hnp_direct || orte_static_ports) {
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_framework.framework_output,
|
2011-07-14 02:49:56 +04:00
|
|
|
"%s routing to the HNP through my parent %s",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_PARENT)));
|
|
|
|
ret = ORTE_PROC_MY_PARENT;
|
|
|
|
goto found;
|
|
|
|
} else {
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_framework.framework_output,
|
2011-07-14 02:49:56 +04:00
|
|
|
"%s routing direct to the HNP",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
|
|
|
|
ret = ORTE_PROC_MY_HNP;
|
|
|
|
goto found;
|
|
|
|
}
|
2008-05-06 02:32:25 +04:00
|
|
|
}
|
2011-06-24 00:38:02 +04:00
|
|
|
|
2011-07-14 02:49:56 +04:00
|
|
|
|
2008-11-01 00:10:00 +03:00
|
|
|
daemon.jobid = ORTE_PROC_MY_NAME->jobid;
|
|
|
|
/* find out what daemon hosts this proc */
|
2012-06-27 18:53:55 +04:00
|
|
|
if (ORTE_VPID_INVALID == (daemon.vpid = orte_get_proc_daemon_vpid(target))) {
|
2011-06-24 00:38:02 +04:00
|
|
|
/*ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);*/
|
2008-11-18 18:35:50 +03:00
|
|
|
ret = ORTE_NAME_INVALID;
|
2008-05-06 02:32:25 +04:00
|
|
|
goto found;
|
|
|
|
}
|
2011-06-24 00:38:02 +04:00
|
|
|
|
2008-11-01 00:10:00 +03:00
|
|
|
/* if the daemon is me, then send direct to the target! */
|
|
|
|
if (ORTE_PROC_MY_NAME->vpid == daemon.vpid) {
|
|
|
|
ret = target;
|
2009-05-11 18:11:44 +04:00
|
|
|
goto found;
|
2015-06-24 06:59:57 +03:00
|
|
|
}
|
2011-06-24 00:38:02 +04:00
|
|
|
|
|
|
|
/* search routing tree for next step to that daemon */
|
|
|
|
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 == daemon.vpid) {
|
|
|
|
/* the child is hosting the proc - just send it there */
|
|
|
|
ret = &daemon;
|
|
|
|
goto found;
|
|
|
|
}
|
|
|
|
/* otherwise, see if the daemon we need is below the child */
|
|
|
|
if (opal_bitmap_is_set_bit(&child->relatives, daemon.vpid)) {
|
|
|
|
/* yep - we need to step through this child */
|
|
|
|
daemon.vpid = child->vpid;
|
|
|
|
|
|
|
|
ret = &daemon;
|
|
|
|
goto found;
|
2009-05-11 18:11:44 +04:00
|
|
|
}
|
2008-11-01 00:10:00 +03:00
|
|
|
}
|
2008-05-06 02:32:25 +04:00
|
|
|
|
2009-05-11 18:11:44 +04:00
|
|
|
/* if we get here, then the target daemon is not beneath
|
|
|
|
* any of our children, so we have to step up through our parent
|
|
|
|
*/
|
2011-07-07 22:54:30 +04:00
|
|
|
daemon.vpid = ORTE_PROC_MY_PARENT->vpid;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2009-05-11 18:11:44 +04:00
|
|
|
ret = &daemon;
|
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
found:
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((1, orte_routed_base_framework.framework_output,
|
2008-05-06 02:32:25 +04:00
|
|
|
"%s routed_binomial_get(%s) --> %s",
|
2009-03-06 00:50:47 +03:00
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
2015-06-24 06:59:57 +03:00
|
|
|
ORTE_NAME_PRINT(target),
|
2009-03-06 00:50:47 +03:00
|
|
|
ORTE_NAME_PRINT(ret)));
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
return *ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int route_lost(const orte_process_name_t *route)
|
|
|
|
{
|
2010-07-18 01:03:27 +04:00
|
|
|
opal_list_item_t *item;
|
|
|
|
orte_routed_tree_t *child;
|
|
|
|
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_framework.framework_output,
|
2010-07-18 01:03:27 +04:00
|
|
|
"%s route to %s lost",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
|
|
|
ORTE_NAME_PRINT(route)));
|
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
/* 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)) {
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_framework.framework_output,
|
2012-04-06 18:23:13 +04:00
|
|
|
"%s routed:binomial: Connection to lifeline %s lost",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
|
|
|
ORTE_NAME_PRINT(lifeline)));
|
2008-05-06 02:32:25 +04:00
|
|
|
return ORTE_ERR_FATAL;
|
|
|
|
}
|
|
|
|
|
2010-07-18 01:03:27 +04:00
|
|
|
/* if we are the HNP or a daemon, is it a daemon, and one of my children? if so, then
|
|
|
|
* remove it from the child list
|
|
|
|
*/
|
|
|
|
if ((ORTE_PROC_IS_DAEMON || 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) {
|
2015-06-24 06:59:57 +03:00
|
|
|
OPAL_OUTPUT_VERBOSE((4, orte_routed_base_framework.framework_output,
|
|
|
|
"%s routed_binomial: removing route to child daemon %s",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
2011-10-11 01:41:49 +04:00
|
|
|
ORTE_NAME_PRINT(route)));
|
2010-07-18 01:03:27 +04:00
|
|
|
opal_list_remove_item(&my_children, item);
|
|
|
|
OBJ_RELEASE(item);
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
/* we don't care about this one, so return success */
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static bool route_is_defined(const orte_process_name_t *target)
|
|
|
|
{
|
2008-11-01 00:10:00 +03:00
|
|
|
/* find out what daemon hosts this proc */
|
2012-06-27 18:53:55 +04:00
|
|
|
if (ORTE_VPID_INVALID == orte_get_proc_daemon_vpid((orte_process_name_t*)target)) {
|
2008-11-01 00:10:00 +03:00
|
|
|
return false;
|
|
|
|
}
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2008-12-21 02:23:11 +03:00
|
|
|
static int set_lifeline(orte_process_name_t *proc)
|
|
|
|
{
|
|
|
|
/* we have to copy the proc data because there is no
|
|
|
|
* guarantee that it will be preserved
|
|
|
|
*/
|
|
|
|
local_lifeline.jobid = proc->jobid;
|
|
|
|
local_lifeline.vpid = proc->vpid;
|
|
|
|
lifeline = &local_lifeline;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-12-21 02:23:11 +03:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2008-10-03 00:08:27 +04:00
|
|
|
static int binomial_tree(int rank, int parent, int me, int num_procs,
|
2015-06-24 06:59:57 +03:00
|
|
|
int *nchildren, opal_list_t *childrn,
|
2012-04-06 18:23:13 +04:00
|
|
|
opal_bitmap_t *relatives, bool mine)
|
2008-05-06 02:32:25 +04:00
|
|
|
{
|
|
|
|
int i, bitmap, peer, hibit, mask, found;
|
2008-10-03 00:08:27 +04:00
|
|
|
orte_routed_tree_t *child;
|
|
|
|
opal_bitmap_t *relations;
|
2011-06-24 00:38:02 +04:00
|
|
|
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((3, orte_routed_base_framework.framework_output,
|
2011-08-16 20:41:33 +04:00
|
|
|
"%s routed:binomial rank %d parent %d me %d num_procs %d",
|
2011-08-16 16:22:05 +04:00
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
2011-08-16 20:41:33 +04:00
|
|
|
rank, parent, me, num_procs));
|
2011-08-16 16:22:05 +04:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
/* is this me? */
|
|
|
|
if (me == rank) {
|
|
|
|
bitmap = opal_cube_dim(num_procs);
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
hibit = opal_hibit(rank, bitmap);
|
|
|
|
--bitmap;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
for (i = hibit + 1, mask = 1 << i; i <= bitmap; ++i, mask <<= 1) {
|
|
|
|
peer = rank | mask;
|
|
|
|
if (peer < num_procs) {
|
2008-10-03 00:08:27 +04:00
|
|
|
child = OBJ_NEW(orte_routed_tree_t);
|
|
|
|
child->vpid = peer;
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((3, orte_routed_base_framework.framework_output,
|
2011-06-24 00:38:02 +04:00
|
|
|
"%s routed:binomial %d found child %s",
|
2009-03-06 00:50:47 +03:00
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
2011-06-24 00:38:02 +04:00
|
|
|
rank,
|
2009-03-06 00:50:47 +03:00
|
|
|
ORTE_VPID_PRINT(child->vpid)));
|
2011-06-24 00:38:02 +04:00
|
|
|
|
2012-04-06 18:23:13 +04:00
|
|
|
if (mine) {
|
2008-10-03 00:08:27 +04:00
|
|
|
/* this is a direct child - add it to my list */
|
|
|
|
opal_list_append(childrn, &child->super);
|
|
|
|
(*nchildren)++;
|
|
|
|
/* setup the relatives bitmap */
|
|
|
|
opal_bitmap_init(&child->relatives, num_procs);
|
2011-06-24 00:38:02 +04:00
|
|
|
|
2008-10-03 00:08:27 +04:00
|
|
|
/* point to the relatives */
|
|
|
|
relations = &child->relatives;
|
|
|
|
} else {
|
|
|
|
/* we are recording someone's relatives - set the bit */
|
|
|
|
opal_bitmap_set_bit(relatives, peer);
|
|
|
|
/* point to this relations */
|
|
|
|
relations = relatives;
|
|
|
|
}
|
|
|
|
/* search for this child's relatives */
|
2012-04-06 18:23:13 +04:00
|
|
|
binomial_tree(0, 0, peer, num_procs, nchildren, childrn, relations, false);
|
2008-05-06 02:32:25 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return parent;
|
|
|
|
}
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
/* find the children of this rank */
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((5, orte_routed_base_framework.framework_output,
|
2011-08-16 16:22:05 +04:00
|
|
|
"%s routed:binomial find children of rank %d",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), rank));
|
2008-05-06 02:32:25 +04:00
|
|
|
bitmap = opal_cube_dim(num_procs);
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
hibit = opal_hibit(rank, bitmap);
|
|
|
|
--bitmap;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
for (i = hibit + 1, mask = 1 << i; i <= bitmap; ++i, mask <<= 1) {
|
|
|
|
peer = rank | mask;
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((5, orte_routed_base_framework.framework_output,
|
2011-08-16 20:41:33 +04:00
|
|
|
"%s routed:binomial find children checking peer %d",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), peer));
|
2008-05-06 02:32:25 +04:00
|
|
|
if (peer < num_procs) {
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((5, orte_routed_base_framework.framework_output,
|
2011-08-16 20:41:33 +04:00
|
|
|
"%s routed:binomial find children computing tree",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
|
2008-05-06 02:32:25 +04:00
|
|
|
/* execute compute on this child */
|
2012-04-06 18:23:13 +04:00
|
|
|
if (0 <= (found = binomial_tree(peer, rank, me, num_procs, nchildren, childrn, relatives, mine))) {
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((5, orte_routed_base_framework.framework_output,
|
2011-08-16 19:47:37 +04:00
|
|
|
"%s routed:binomial find children returning found value %d",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), found));
|
2008-05-06 02:32:25 +04:00
|
|
|
return found;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2012-04-06 18:23:13 +04:00
|
|
|
static void update_routing_plan(void)
|
2008-05-06 02:32:25 +04:00
|
|
|
{
|
2008-10-03 17:41:08 +04:00
|
|
|
orte_routed_tree_t *child;
|
|
|
|
int j;
|
2008-05-06 02:32:25 +04:00
|
|
|
opal_list_item_t *item;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-06-20 07:26:13 +04:00
|
|
|
/* if I am anything other than a daemon or the HNP, this
|
|
|
|
* is a meaningless command as I am not allowed to route
|
|
|
|
*/
|
2009-05-04 15:07:40 +04:00
|
|
|
if (!ORTE_PROC_IS_DAEMON && !ORTE_PROC_IS_HNP) {
|
2012-04-06 18:23:13 +04:00
|
|
|
return;
|
2008-06-20 07:26:13 +04:00
|
|
|
}
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-05-06 02:32:25 +04:00
|
|
|
/* clear the list of children if any are already present */
|
|
|
|
while (NULL != (item = opal_list_remove_first(&my_children))) {
|
|
|
|
OBJ_RELEASE(item);
|
|
|
|
}
|
|
|
|
num_children = 0;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2008-10-03 00:08:27 +04:00
|
|
|
/* compute my direct children and the bitmap that shows which vpids
|
|
|
|
* lie underneath their branch
|
|
|
|
*/
|
2011-07-07 22:54:30 +04:00
|
|
|
ORTE_PROC_MY_PARENT->vpid = binomial_tree(0, 0, ORTE_PROC_MY_NAME->vpid,
|
2011-06-24 00:38:02 +04:00
|
|
|
orte_process_info.max_procs,
|
2012-04-06 18:23:13 +04:00
|
|
|
&num_children, &my_children, NULL, true);
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2013-03-28 01:14:43 +04:00
|
|
|
if (0 < opal_output_get_verbosity(orte_routed_base_framework.framework_output)) {
|
2011-07-07 22:54:30 +04:00
|
|
|
opal_output(0, "%s: parent %d num_children %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_PROC_MY_PARENT->vpid, num_children);
|
2008-10-03 00:08:27 +04:00
|
|
|
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;
|
2009-03-06 00:50:47 +03:00
|
|
|
opal_output(0, "%s: \tchild %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), child->vpid);
|
2011-06-24 00:38:02 +04:00
|
|
|
for (j=0; j < (int)orte_process_info.max_procs; j++) {
|
2008-10-03 00:08:27 +04:00
|
|
|
if (opal_bitmap_is_set_bit(&child->relatives, j)) {
|
2009-03-06 00:50:47 +03:00
|
|
|
opal_output(0, "%s: \t\trelation %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), j);
|
2008-10-03 00:08:27 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-05-06 02:32:25 +04:00
|
|
|
}
|
|
|
|
|
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 22:56:47 +04:00
|
|
|
static void get_routing_list(opal_list_t *coll)
|
2008-05-06 02:32:25 +04:00
|
|
|
{
|
2012-04-06 18:23:13 +04:00
|
|
|
|
2008-06-20 07:26:13 +04:00
|
|
|
/* if I am anything other than a daemon or the HNP, this
|
|
|
|
* is a meaningless command as I am not allowed to route
|
|
|
|
*/
|
2009-05-04 15:07:40 +04:00
|
|
|
if (!ORTE_PROC_IS_DAEMON && !ORTE_PROC_IS_HNP) {
|
2012-04-06 18:23:13 +04:00
|
|
|
return;
|
2008-06-20 07:26:13 +04:00
|
|
|
}
|
2015-06-24 06:59:57 +03:00
|
|
|
|
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 22:56:47 +04:00
|
|
|
orte_routed_base_xcast_routing(coll, &my_children);
|
2008-05-06 02:32:25 +04:00
|
|
|
}
|
|
|
|
|
2010-07-18 01:03:27 +04:00
|
|
|
static size_t num_routes(void)
|
|
|
|
{
|
2013-03-28 01:14:43 +04:00
|
|
|
OPAL_OUTPUT_VERBOSE((2, orte_routed_base_framework.framework_output,
|
2010-07-18 01:03:27 +04:00
|
|
|
"%s num routes %d",
|
|
|
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
|
|
|
(int)opal_list_get_size(&my_children)));
|
|
|
|
return opal_list_get_size(&my_children);
|
|
|
|
}
|
2008-10-03 00:08:27 +04:00
|
|
|
|
2010-03-13 02:57:50 +03:00
|
|
|
#if OPAL_ENABLE_FT_CR == 1
|
2008-05-06 02:32:25 +04:00
|
|
|
static int binomial_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
|
|
|
|
|