root/orte/mca/sstore/base/sstore_base_select.c

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

DEFINITIONS

This source file includes following definitions.
  1. orte_sstore_base_select

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c)      2010 The Trustees of Indiana University.
   4  *                         All rights reserved.
   5  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
   6  *                         reserved.
   7  * $COPYRIGHT$
   8  *
   9  * Additional copyrights may follow
  10  *
  11  * $HEADER$
  12  */
  13 
  14 #include "orte_config.h"
  15 
  16 #include <string.h>
  17 
  18 #include "orte/constants.h"
  19 
  20 #include "orte/mca/mca.h"
  21 #include "opal/util/output.h"
  22 #include "opal/mca/base/base.h"
  23 
  24 #include "orte/mca/sstore/sstore.h"
  25 #include "orte/mca/sstore/base/base.h"
  26 
  27 
  28 int orte_sstore_base_select(void)
  29 {
  30     int exit_status = OPAL_SUCCESS;
  31     orte_sstore_base_component_t *best_component = NULL;
  32     orte_sstore_base_module_t *best_module = NULL;
  33 
  34     /*
  35      * Select the best component
  36      */
  37     if( OPAL_SUCCESS != mca_base_select("sstore", orte_sstore_base_framework.framework_output,
  38                                         &orte_sstore_base_framework.framework_components,
  39                                         (mca_base_module_t **) &best_module,
  40                                         (mca_base_component_t **) &best_component, NULL) ) {
  41         /* This will only happen if no component was selected */
  42         exit_status = ORTE_ERROR;
  43         goto cleanup;
  44     }
  45 
  46     /* Save the winner */
  47     orte_sstore = *best_module;
  48 
  49     /* Initialize the winner */
  50     if (NULL != best_module) {
  51         if (OPAL_SUCCESS != orte_sstore.sstore_init()) {
  52             exit_status = OPAL_ERROR;
  53             goto cleanup;
  54         }
  55     }
  56 
  57  cleanup:
  58     return exit_status;
  59 }

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