1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2 /*
3 * Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
4 * University Research and Technology
5 * Corporation. All rights reserved.
6 * Copyright (c) 2004-2007 The University of Tennessee and The University
7 * of Tennessee Research Foundation. All rights
8 * reserved.
9 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10 * University of Stuttgart. All rights reserved.
11 * Copyright (c) 2004-2005 The Regents of the University of California.
12 * All rights reserved.
13 * Copyright (c) 2011-2015 Los Alamos National Security, LLC.
14 * All rights reserved.
15 * Copyright (c) 2015 Intel, Inc. All rights reserved.
16 * $COPYRIGHT$
17 *
18 * Additional copyrights may follow
19 *
20 * $HEADER$
21 */
22
23 #include "orte_config.h"
24 #include "orte/constants.h"
25
26 #include "orte/mca/mca.h"
27 #include "opal/mca/base/base.h"
28 #include "opal/mca/base/mca_base_component_repository.h"
29
30 #include "orte/util/proc_info.h"
31
32 #include "orte/mca/plm/base/plm_private.h"
33 #include "orte/mca/plm/base/base.h"
34
35
36 /**
37 * Function for selecting one component from all those that are
38 * available.
39 */
40
41 int orte_plm_base_select(void)
42 {
43 int rc;
44 orte_plm_base_component_t *best_component = NULL;
45 orte_plm_base_module_t *best_module = NULL;
46
47 /*
48 * Select the best component
49 */
50 if (OPAL_SUCCESS == (rc = mca_base_select("plm", orte_plm_base_framework.framework_output,
51 &orte_plm_base_framework.framework_components,
52 (mca_base_module_t **) &best_module,
53 (mca_base_component_t **) &best_component, NULL))) {
54 /* Save the winner */
55 orte_plm = *best_module;
56 }
57
58 return rc;
59 }