1
1
openmpi/orte/mca/rmcast/base/rmcast_base_select.c
Ralph Castain 18960a9c5a Refactor the multicast support so the data type objects can be accessed beyond just the one component
Ensure that the local node is included in the allocation prior to bootstrap discovery

This commit was SVN r22099.
2009-10-14 17:43:40 +00:00

61 строка
1.5 KiB
C

/*
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h"
#include "orte/constants.h"
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "orte/mca/errmgr/errmgr.h"
#include "orte/mca/rmcast/base/base.h"
#include "orte/mca/rmcast/base/private.h"
static bool selected = false;
/*
* Select one RMCAST component from all those that are available.
*/
int orte_rmcast_base_select(void)
{
mca_base_component_t *best_component = NULL;
orte_rmcast_module_t *best_module = NULL;
int rc;
if (selected) {
/* ensure we don't do this twice */
return ORTE_SUCCESS;
}
selected = true;
/*
* Select the best component
*/
if( OPAL_SUCCESS != mca_base_select("rmcast", orte_rmcast_base.rmcast_output,
&orte_rmcast_base.rmcast_opened,
(mca_base_module_t **) &best_module,
(mca_base_component_t **) &best_component) ) {
/* This will only happen if no component was selected */
return ORTE_ERR_NOT_FOUND;
}
orte_rmcast = *best_module;
/* init the selected module */
if (NULL != orte_rmcast.init) {
if (ORTE_SUCCESS != (rc = orte_rmcast.init())) {
ORTE_ERROR_LOG(rc);
return rc;
}
}
return ORTE_SUCCESS;
}