root/ompi/mca/bml/r2/bml_r2_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. mca_bml_r2_component_register
  2. mca_bml_r2_component_open
  3. mca_bml_r2_component_close
  4. mca_bml_r2_component_init

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
   4  *                         University Research and Technology
   5  *                         Corporation.  All rights reserved.
   6  * Copyright (c) 2004-2006 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-2006 The Regents of the University of California.
  12  *                         All rights reserved.
  13  * Copyright (c) 2010-2015 Cisco Systems, Inc.  All rights reserved.
  14  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
  15  *                         reserved.
  16  * $COPYRIGHT$
  17  *
  18  * Additional copyrights may follow
  19  *
  20  * $HEADER$
  21  */
  22 
  23 #include "ompi_config.h"
  24 #include "opal/mca/event/event.h"
  25 #include "opal/mca/btl/base/base.h"
  26 #include "ompi/mca/bml/bml.h"
  27 #include "bml_r2.h"
  28 #include "mpi.h"
  29 
  30 static int mca_bml_r2_component_register(void);
  31 
  32 mca_bml_base_component_2_0_0_t mca_bml_r2_component = {
  33 
  34     /* First, the mca_base_component_t struct containing meta
  35        information about the component itself */
  36 
  37     .bml_version = {
  38         MCA_BML_BASE_VERSION_2_0_0,
  39 
  40         .mca_component_name = "r2",
  41         MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
  42                               OMPI_RELEASE_VERSION),
  43         .mca_open_component = mca_bml_r2_component_open,
  44         .mca_close_component = mca_bml_r2_component_close,
  45         .mca_register_component_params = mca_bml_r2_component_register,
  46     },
  47     .bml_data = {
  48         /* The component is checkpoint ready */
  49         MCA_BASE_METADATA_PARAM_CHECKPOINT
  50     },
  51     .bml_init = mca_bml_r2_component_init,
  52 };
  53 
  54 static int mca_bml_r2_component_register(void)
  55 {
  56     mca_bml_r2.show_unreach_errors = true;
  57     (void) mca_base_component_var_register(&mca_bml_r2_component.bml_version,
  58                                            "show_unreach_errors",
  59                                            "Show error message when procs are unreachable",
  60                                            MCA_BASE_VAR_TYPE_BOOL, NULL, 0,0,
  61                                            OPAL_INFO_LVL_9,
  62                                            MCA_BASE_VAR_SCOPE_READONLY,
  63                                            &mca_bml_r2.show_unreach_errors);
  64 
  65     return OMPI_SUCCESS;
  66 }
  67 
  68 int mca_bml_r2_component_open(void)
  69 {
  70     return OMPI_SUCCESS;
  71 }
  72 
  73 
  74 int mca_bml_r2_component_close(void)
  75 {
  76     return OMPI_SUCCESS;
  77 }
  78 
  79 
  80 mca_bml_base_module_t* mca_bml_r2_component_init( int* priority,
  81                                                   bool enable_progress_threads,
  82                                                   bool enable_mpi_threads )
  83 {
  84     /* initialize BTLs */
  85 
  86     if(OMPI_SUCCESS != mca_btl_base_select(enable_progress_threads,enable_mpi_threads))
  87         return NULL;
  88 
  89     *priority = 100;
  90     mca_bml_r2.btls_added = false;
  91     return &mca_bml_r2.super;
  92 }

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