![Ralph Castain](/assets/img/avatar_default.png)
* add hnp and orted modules to the errmgr framework. The HNP module contains much of the code that was in the errmgr base since that code could only be executed by the HNP anyway. * update the odls to report process states directly into the active errmgr module, thus removing the need to send messages looped back into the odls cmd processor. Let the active errmgr module decide what to do at various states. * remove the code to track application state progress from the plm_base_launch_support.c code. Update the plm modules to call the errmgr directly when a launch fails. * update the plm_base_receive.c code to call the errmgr with state updates from remote daemons * update the routed modules to reflect that process state is updated in the errmgr * ensure that the orted's open the errmgr and select their appropriate module * add new pretty-print utilities to print process and job state. Move the pretty-print of time info to a globally-accessible place * define a global orte_comm function to send messages from orted's to the HNP so that others can overlay the standard RML methods, if desired. * update the orterun help output to reflect that the "term w/o sync" error message can result from three, not two, scenarios This commit was SVN r23023.
164 строки
4.4 KiB
C
164 строки
4.4 KiB
C
/*
|
|
* Copyright (c) 2007 Los Alamos National Security, LLC.
|
|
* All rights reserved.
|
|
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
|
* Copyright (c) 2004-2010 The Trustees of Indiana University.
|
|
* All rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#include "orte_config.h"
|
|
#include "orte/constants.h"
|
|
|
|
#include "opal/mca/mca.h"
|
|
#include "opal/class/opal_bitmap.h"
|
|
#include "opal/util/output.h"
|
|
#include "opal/mca/base/mca_base_component_repository.h"
|
|
|
|
#include "orte/mca/routed/routed.h"
|
|
#include "orte/mca/routed/base/base.h"
|
|
|
|
|
|
/* The following file was created by configure. It contains extern
|
|
* statements and the definition of an array of pointers to each
|
|
* component's public mca_base_component_t struct. */
|
|
#include "orte/mca/routed/base/static-components.h"
|
|
|
|
#if ORTE_DISABLE_FULL_SUPPORT
|
|
/* have to include a bogus function here so that
|
|
* the build system sees at least one function
|
|
* in the library
|
|
*/
|
|
int orte_routed_base_open(void)
|
|
{
|
|
return ORTE_SUCCESS;
|
|
}
|
|
|
|
#else
|
|
|
|
static void construct(orte_routed_tree_t *rt)
|
|
{
|
|
rt->vpid = ORTE_VPID_INVALID;
|
|
OBJ_CONSTRUCT(&rt->relatives, opal_bitmap_t);
|
|
}
|
|
static void destruct(orte_routed_tree_t *rt)
|
|
{
|
|
OBJ_DESTRUCT(&rt->relatives);
|
|
}
|
|
OBJ_CLASS_INSTANCE(orte_routed_tree_t, opal_list_item_t,
|
|
construct, destruct);
|
|
|
|
int orte_routed_base_output = -1;
|
|
orte_routed_module_t orte_routed = {0};
|
|
opal_list_t orte_routed_base_components;
|
|
opal_mutex_t orte_routed_base_lock;
|
|
opal_condition_t orte_routed_base_cond;
|
|
bool orte_routed_base_wait_sync;
|
|
|
|
static orte_routed_component_t *active_component = NULL;
|
|
static bool component_open_called = false;
|
|
static bool opened = false;
|
|
static bool selected = false;
|
|
|
|
int
|
|
orte_routed_base_open(void)
|
|
{
|
|
int ret;
|
|
|
|
if (opened) {
|
|
return ORTE_SUCCESS;
|
|
}
|
|
opened = true;
|
|
|
|
/* setup the output stream */
|
|
orte_routed_base_output = opal_output_open(NULL);
|
|
OBJ_CONSTRUCT(&orte_routed_base_lock, opal_mutex_t);
|
|
OBJ_CONSTRUCT(&orte_routed_base_cond, opal_condition_t);
|
|
orte_routed_base_wait_sync = false;
|
|
|
|
/* Initialize globals */
|
|
OBJ_CONSTRUCT(&orte_routed_base_components, opal_list_t);
|
|
|
|
/* Open up all available components */
|
|
ret = mca_base_components_open("routed",
|
|
orte_routed_base_output,
|
|
mca_routed_base_static_components,
|
|
&orte_routed_base_components,
|
|
true);
|
|
component_open_called = true;
|
|
|
|
return ret;
|
|
}
|
|
|
|
int
|
|
orte_routed_base_select(void)
|
|
{
|
|
int ret, exit_status = OPAL_SUCCESS;
|
|
orte_routed_component_t *best_component = NULL;
|
|
orte_routed_module_t *best_module = NULL;
|
|
|
|
if (selected) {
|
|
return ORTE_SUCCESS;
|
|
}
|
|
selected = true;
|
|
|
|
/*
|
|
* Select the best component
|
|
*/
|
|
if( OPAL_SUCCESS != mca_base_select("routed", orte_routed_base_output,
|
|
&orte_routed_base_components,
|
|
(mca_base_module_t **) &best_module,
|
|
(mca_base_component_t **) &best_component) ) {
|
|
/* This will only happen if no component was selected */
|
|
exit_status = ORTE_ERR_NOT_FOUND;
|
|
goto cleanup;
|
|
}
|
|
|
|
/* Save the winner */
|
|
orte_routed = *best_module;
|
|
active_component = best_component;
|
|
|
|
/* initialize the selected component */
|
|
opal_output_verbose(10, orte_routed_base_output,
|
|
"orte_routed_base_select: initializing selected component %s",
|
|
best_component->base_version.mca_component_name);
|
|
if (ORTE_SUCCESS != (ret = orte_routed.initialize()) ) {
|
|
exit_status = ret;
|
|
goto cleanup;
|
|
}
|
|
|
|
cleanup:
|
|
return exit_status;
|
|
}
|
|
|
|
|
|
int
|
|
orte_routed_base_close(void)
|
|
{
|
|
/* finalize the selected component */
|
|
if (NULL != orte_routed.finalize) {
|
|
orte_routed.finalize();
|
|
}
|
|
|
|
/* shutdown any remaining opened components */
|
|
if (component_open_called) {
|
|
mca_base_components_close(orte_routed_base_output,
|
|
&orte_routed_base_components, NULL);
|
|
}
|
|
|
|
OBJ_DESTRUCT(&orte_routed_base_components);
|
|
OBJ_DESTRUCT(&orte_routed_base_lock);
|
|
OBJ_DESTRUCT(&orte_routed_base_cond);
|
|
|
|
opened = false;
|
|
selected = false;
|
|
|
|
return ORTE_SUCCESS;
|
|
}
|
|
|
|
#endif /* ORTE_DISABLE_FULL_SUPPORT */
|