root/ompi/mca/coll/basic/coll_basic_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. basic_register

   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-2016 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) 2008      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  * These symbols are in a file by themselves to provide nice linker
  23  * semantics.  Since linkers generally pull in symbols by object
  24  * files, keeping these symbols as the only symbols in this file
  25  * prevents utility programs such as "ompi_info" from having to import
  26  * entire components just to query their version and parameters.
  27  */
  28 
  29 #include "ompi_config.h"
  30 #include "coll_basic.h"
  31 
  32 #include "mpi.h"
  33 #include "ompi/mca/coll/coll.h"
  34 #include "coll_basic.h"
  35 
  36 /*
  37  * Public string showing the coll ompi_basic component version number
  38  */
  39 const char *mca_coll_basic_component_version_string =
  40     "Open MPI basic collective MCA component version " OMPI_VERSION;
  41 
  42 /*
  43  * Global variables
  44  */
  45 int mca_coll_basic_priority = 10;
  46 int mca_coll_basic_crossover = 4;
  47 
  48 /*
  49  * Local function
  50  */
  51 static int basic_register(void);
  52 
  53 /*
  54  * Instantiate the public struct with all of our public information
  55  * and pointers to our public functions in it
  56  */
  57 
  58 const mca_coll_base_component_2_0_0_t mca_coll_basic_component = {
  59 
  60     /* First, the mca_component_t struct containing meta information
  61      * about the component itself */
  62 
  63     .collm_version = {
  64         MCA_COLL_BASE_VERSION_2_0_0,
  65 
  66         /* Component name and version */
  67         .mca_component_name = "basic",
  68         MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
  69                               OMPI_RELEASE_VERSION),
  70 
  71         /* Component open and close functions */
  72         .mca_register_component_params = basic_register,
  73     },
  74     .collm_data = {
  75         /* The component is checkpoint ready */
  76         MCA_BASE_METADATA_PARAM_CHECKPOINT
  77     },
  78 
  79     /* Initialization / querying functions */
  80 
  81     .collm_init_query = mca_coll_basic_init_query,
  82     .collm_comm_query = mca_coll_basic_comm_query,
  83 };
  84 
  85 
  86 static int
  87 basic_register(void)
  88 {
  89     /* Use a low priority, but allow other components to be lower */
  90 
  91     mca_coll_basic_priority = 10;
  92     (void) mca_base_component_var_register(&mca_coll_basic_component.collm_version, "priority",
  93                                            "Priority of the basic coll component",
  94                                            MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  95                                            OPAL_INFO_LVL_9,
  96                                            MCA_BASE_VAR_SCOPE_READONLY,
  97                                            &mca_coll_basic_priority);
  98     mca_coll_basic_crossover = 4;
  99     (void) mca_base_component_var_register(&mca_coll_basic_component.collm_version, "crossover",
 100                                            "Minimum number of processes in a communicator before using the logarithmic algorithms",
 101                                            MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
 102                                            OPAL_INFO_LVL_9,
 103                                            MCA_BASE_VAR_SCOPE_READONLY,
 104                                            &mca_coll_basic_crossover);
 105 
 106     return OMPI_SUCCESS;
 107 }
 108 
 109 OBJ_CLASS_INSTANCE(mca_coll_basic_module_t,
 110                    mca_coll_base_module_t,
 111                    NULL,
 112                    NULL);
 113 

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