2015-10-19 19:39:35 +03:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2012-10-25 21:15:17 +04:00
|
|
|
/*
|
2015-10-19 19:39:35 +03:00
|
|
|
* Copyright (c) 2012-2015 Los Alamos National Security, Inc. All rights
|
|
|
|
* reserved.
|
2012-10-25 21:15:17 +04:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2012-10-25 21:15:17 +04:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2012-10-25 21:15:17 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
#include "orte/constants.h"
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
2015-03-06 06:50:44 +03:00
|
|
|
#include "orte/mca/mca.h"
|
2012-10-25 21:15:17 +04:00
|
|
|
#include "opal/mca/base/base.h"
|
|
|
|
#include "opal/util/output.h"
|
|
|
|
|
|
|
|
#include "orte/mca/dfs/base/base.h"
|
|
|
|
|
|
|
|
int orte_dfs_base_select(void)
|
|
|
|
{
|
2012-10-30 03:05:45 +04:00
|
|
|
int exit_status = ORTE_SUCCESS;
|
2012-10-25 21:15:17 +04:00
|
|
|
orte_dfs_base_component_t *best_component = NULL;
|
|
|
|
orte_dfs_base_module_t *best_module = NULL;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Select the best component
|
|
|
|
*/
|
2013-03-28 01:14:43 +04:00
|
|
|
if (OPAL_SUCCESS != mca_base_select("dfs", orte_dfs_base_framework.framework_output,
|
|
|
|
&orte_dfs_base_framework.framework_components,
|
2012-10-25 21:15:17 +04:00
|
|
|
(mca_base_module_t **) &best_module,
|
2015-10-19 19:39:35 +03:00
|
|
|
(mca_base_component_t **) &best_component, NULL)) {
|
2012-10-30 03:05:45 +04:00
|
|
|
/* This will only happen if no component was selected, which
|
|
|
|
* is okay - we don't have to select anything
|
|
|
|
*/
|
|
|
|
return ORTE_SUCCESS;
|
2012-10-25 21:15:17 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Save the winner */
|
|
|
|
orte_dfs = *best_module;
|
|
|
|
|
|
|
|
/* Initialize the winner */
|
2012-10-30 03:05:45 +04:00
|
|
|
if (NULL != best_module && NULL != orte_dfs.init) {
|
|
|
|
if (ORTE_SUCCESS != orte_dfs.init()) {
|
|
|
|
exit_status = ORTE_ERROR;
|
2012-10-25 21:15:17 +04:00
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cleanup:
|
|
|
|
return exit_status;
|
|
|
|
}
|