root/opal/mca/reachable/weighted/reachable_weighted_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. reachable_weighted_open
  2. reachable_weighted_close
  3. component_register
  4. reachable_weighted_component_query

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2014      Intel, Inc.  All rights reserved.
   4  * Copyright (c) 2014      Research Organization for Information Science
   5  *                         and Technology (RIST). All rights reserved.
   6  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
   7  *                         reserved.
   8  * Copyright (c) 2017      Amazon.com, Inc. or its affiliates.
   9  *                         All Rights reserved.
  10  * $COPYRIGHT$
  11  *
  12  * Additional copyrights may follow
  13  *
  14  * $HEADER$
  15  *
  16  * These symbols are in a file by themselves to provide nice linker
  17  * semantics.  Since linkers generally pull in symbols by object
  18  * files, keeping these symbols as the only symbols in this file
  19  * prevents utility programs such as "ompi_info" from having to import
  20  * entire components just to query their version and parameters.
  21  */
  22 
  23 #include "opal_config.h"
  24 
  25 #include "opal/constants.h"
  26 #include "opal/util/proc.h"
  27 #include "opal/mca/reachable/reachable.h"
  28 #include "reachable_weighted.h"
  29 
  30 /*
  31  * Public string showing the reachable weighted component version number
  32  */
  33 const char *opal_reachable_weighted_component_version_string =
  34     "OPAL weighted reachable MCA component version " OPAL_VERSION;
  35 
  36 /*
  37  * Local function
  38  */
  39 static int reachable_weighted_open(void);
  40 static int reachable_weighted_close(void);
  41 static int reachable_weighted_component_query(mca_base_module_t **module, int *priority);
  42 static int component_register(void);
  43 
  44 
  45 /*
  46  * Instantiate the public struct with all of our public information
  47  * and pointers to our public functions in it
  48  */
  49 
  50 opal_reachable_weighted_component_t mca_reachable_weighted_component = {
  51     {
  52 
  53         /* First, the mca_component_t struct containing meta information
  54            about the component itself */
  55 
  56         .base_version = {
  57             /* Indicate that we are a reachable v1.1.0 component (which also
  58                implies a specific MCA version) */
  59 
  60             OPAL_REACHABLE_BASE_VERSION_2_0_0,
  61 
  62             /* Component name and version */
  63 
  64             .mca_component_name = "weighted",
  65             MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION,
  66                                   OPAL_RELEASE_VERSION),
  67 
  68             /* Component open and close functions */
  69 
  70             .mca_open_component = reachable_weighted_open,
  71             .mca_close_component = reachable_weighted_close,
  72             .mca_query_component = reachable_weighted_component_query,
  73             .mca_register_component_params = component_register,
  74         },
  75         /* Next the MCA v1.0.0 component meta data */
  76         .base_data = {
  77             /* The component is checkpoint ready */
  78             MCA_BASE_METADATA_PARAM_CHECKPOINT
  79         },
  80     }
  81 };
  82 
  83 static int reachable_weighted_open(void)
  84 {
  85     /* construct the component fields */
  86 
  87     return OPAL_SUCCESS;
  88 }
  89 
  90 static int reachable_weighted_close(void)
  91 {
  92     return OPAL_SUCCESS;
  93 }
  94 
  95 static int component_register(void)
  96 {
  97     return OPAL_SUCCESS;
  98 }
  99 
 100 static int reachable_weighted_component_query(mca_base_module_t **module, int *priority)
 101 {
 102     *priority = 1;
 103     *module = (mca_base_module_t *)&opal_reachable_weighted_module;
 104     return OPAL_SUCCESS;
 105 }

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