root/ompi/mca/coll/self/coll_self_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. self_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-2005 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_self.h"
  31 
  32 #include "mpi.h"
  33 #include "ompi/mca/coll/coll.h"
  34 #include "coll_self.h"
  35 
  36 /*
  37  * Public string showing the coll ompi_self component version number
  38  */
  39 const char *mca_coll_self_component_version_string =
  40   "Open MPI self collective MCA component version " OMPI_VERSION;
  41 
  42 /*
  43  * Global variable
  44  */
  45 int ompi_coll_self_priority = 0;
  46 
  47 /*
  48  * Local function
  49  */
  50 static int self_register(void);
  51 
  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_self_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 = "self",
  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 = self_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_self_init_query,
  82     .collm_comm_query = mca_coll_self_comm_query,
  83 };
  84 
  85 static int self_register(void)
  86 {
  87     /* We'll always be picked if there's only one process in the
  88        communicator */
  89     ompi_coll_self_priority = 75;
  90     (void) mca_base_component_var_register(&mca_coll_self_component.collm_version,
  91                                            "priority", NULL, MCA_BASE_VAR_TYPE_INT,
  92                                            NULL, 0, 0, OPAL_INFO_LVL_9,
  93                                            MCA_BASE_VAR_SCOPE_READONLY,
  94                                            &ompi_coll_self_priority);
  95 
  96     return OMPI_SUCCESS;
  97 }
  98 
  99 
 100 OBJ_CLASS_INSTANCE(mca_coll_self_module_t,
 101                    mca_coll_base_module_t,
 102                    NULL, NULL);

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