root/opal/mca/reachable/base/reachable_base_select.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. opal_reachable_base_select

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2014      Intel, Inc. All rights reserved.
   4  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
   5  *                         reserved.
   6  * $COPYRIGHT$
   7  *
   8  * Additional copyrights may follow
   9  *
  10  * $HEADER$
  11  */
  12 
  13 
  14 #include "opal_config.h"
  15 
  16 #include "opal/constants.h"
  17 #include "opal/mca/mca.h"
  18 #include "opal/mca/base/base.h"
  19 #include "opal/mca/reachable/reachable.h"
  20 #include "opal/mca/reachable/base/base.h"
  21 
  22 /*
  23  * Globals
  24  */
  25 
  26 int opal_reachable_base_select(void)
  27 {
  28     int ret;
  29     opal_reachable_base_component_t *best_component = NULL;
  30     opal_reachable_base_module_t *best_module = NULL;
  31 
  32     /*
  33      * Select the best component
  34      */
  35     if( OPAL_SUCCESS != mca_base_select("reachable", opal_reachable_base_framework.framework_output,
  36                                         &opal_reachable_base_framework.framework_components,
  37                                         (mca_base_module_t **) &best_module,
  38                                         (mca_base_component_t **) &best_component, NULL) ) {
  39         /* notify caller that no available component found */
  40         return OPAL_ERR_NOT_FOUND;
  41     }
  42 
  43     /* Save the winner */
  44     opal_reachable = *best_module;
  45 
  46     /* Initialize the winner */
  47     ret = opal_reachable.init();
  48 
  49     return ret;
  50 }

/* [<][>][^][v][top][bottom][index][help] */