root/ompi/mca/fs/ime/fs_ime_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. register_component

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2018      DataDirect Networks. All rights reserved.
   4  * $COPYRIGHT$
   5  *
   6  * Additional copyrights may follow
   7  *
   8  * $HEADER$
   9  */
  10 
  11 #include "ompi_config.h"
  12 #include "fs_ime.h"
  13 #include "mpi.h"
  14 
  15 int mca_fs_ime_priority = FS_IME_BASE_PRIORITY;
  16 int mca_fs_ime_lock_algorithm = FS_IME_LOCK_AUTO;
  17 
  18 /*
  19  * Private functions
  20  */
  21 static int register_component(void);
  22 
  23 
  24 /*
  25  * Public string showing the fs ime component version number
  26  */
  27 const char *mca_fs_ime_component_version_string =
  28   "OMPI/MPI IME FS MCA component version " OMPI_VERSION;
  29 
  30 /*
  31  * Instantiate the public struct with all of our public information
  32  * and pointers to our public functions in it
  33  */
  34 mca_fs_base_component_2_0_0_t mca_fs_ime_component = {
  35 
  36     /* First, the mca_component_t struct containing meta information
  37        about the component itself */
  38 
  39     .fsm_version = {
  40         MCA_FS_BASE_VERSION_2_0_0,
  41 
  42         /* Component name and version */
  43         .mca_component_name = "ime",
  44         MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
  45                               OMPI_RELEASE_VERSION),
  46         .mca_register_component_params = register_component,
  47     },
  48     .fsm_data = {
  49         /* This component is checkpointable */
  50         MCA_BASE_METADATA_PARAM_CHECKPOINT
  51     },
  52     .fsm_init_query = mca_fs_ime_component_init_query,      /* get thread level */
  53     .fsm_file_query = mca_fs_ime_component_file_query,      /* get priority and actions */
  54     .fsm_file_unquery = mca_fs_ime_component_file_unquery,  /* undo what was done by previous function */
  55 };
  56 
  57 static int register_component(void)
  58 {
  59     mca_fs_ime_priority = FS_IME_BASE_PRIORITY;
  60     (void) mca_base_component_var_register(&mca_fs_ime_component.fsm_version,
  61                                            "priority", "Priority of the fs ime component",
  62                                            MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  63                                            OPAL_INFO_LVL_9,
  64                                            MCA_BASE_VAR_SCOPE_READONLY,
  65                                            &mca_fs_ime_priority);
  66 
  67     mca_fs_ime_lock_algorithm = FS_IME_LOCK_AUTO;
  68     (void) mca_base_component_var_register(&mca_fs_ime_component.fsm_version,
  69                                            "lock_algorithm", "Locking algorithm used by the fs ime component. "
  70                                            " 0: auto (default)",
  71                                            MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  72                                            OPAL_INFO_LVL_9,
  73                                            MCA_BASE_VAR_SCOPE_READONLY,
  74                                            &mca_fs_ime_lock_algorithm );
  75 
  76     return OMPI_SUCCESS;
  77 }

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