root/ompi/mca/fs/pvfs2/fs_pvfs2_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. pvfs2_register

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2005 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-2013 University of Houston. All rights reserved.
  14  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
  15  *                         reserved.
  16  * Copyright (c) 2016      Research Organization for Information Science
  17  *                         and Technology (RIST). All rights reserved.
  18  * $COPYRIGHT$
  19  *
  20  * Additional copyrights may follow
  21  *
  22  * $HEADER$
  23  *
  24  * These symbols are in a file by themselves to provide nice linker
  25  * semantics.  Since linkers generally pull in symbols by object
  26  * files, keeping these symbols as the only symbols in this file
  27  * prevents utility programs such as "ompi_info" from having to import
  28  * entire components just to query their version and parameters.
  29  */
  30 
  31 #include "ompi_config.h"
  32 #include "fs_pvfs2.h"
  33 #include "mpi.h"
  34 
  35 /*
  36  * Public string showing the fs pvfs2 component version number
  37  */
  38 const char *mca_fs_pvfs2_component_version_string =
  39   "OMPI/MPI pvfs2 FS MCA component version " OMPI_VERSION;
  40 
  41 static int pvfs2_register(void);
  42 
  43 int mca_fs_pvfs2_priority = 20;
  44 int mca_fs_pvfs2_stripe_size = -1;
  45 int mca_fs_pvfs2_stripe_width = -1;
  46 int mca_fs_pvfs2_IS_INITIALIZED = 0;
  47 
  48 /*
  49  * Instantiate the public struct with all of our public information
  50  * and pointers to our public functions in it
  51  */
  52 mca_fs_base_component_2_0_0_t mca_fs_pvfs2_component = {
  53 
  54     /* First, the mca_component_t struct containing meta information
  55        about the component itself */
  56 
  57     .fsm_version = {
  58         MCA_FS_BASE_VERSION_2_0_0,
  59 
  60         /* Component name and version */
  61         .mca_component_name = "pvfs2",
  62         MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
  63                               OMPI_RELEASE_VERSION),
  64         .mca_register_component_params = pvfs2_register,
  65     },
  66     .fsm_data = {
  67         /* This component is checkpointable */
  68       MCA_BASE_METADATA_PARAM_CHECKPOINT
  69     },
  70     .fsm_init_query = mca_fs_pvfs2_component_init_query,      /* get thread level */
  71     .fsm_file_query = mca_fs_pvfs2_component_file_query,      /* get priority and actions */
  72     .fsm_file_unquery =  mca_fs_pvfs2_component_file_unquery, /* undo what was done by previous function */
  73 };
  74 
  75 static int
  76 pvfs2_register(void)
  77 {
  78     mca_fs_pvfs2_priority = 20;
  79     (void) mca_base_component_var_register (&mca_fs_pvfs2_component.fsm_version,
  80                                             "priority", "Priority of the pvfs2 fs component",
  81                                             MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  82                                             OPAL_INFO_LVL_9,
  83                                             MCA_BASE_VAR_SCOPE_READONLY, &mca_fs_pvfs2_priority);
  84     mca_fs_pvfs2_stripe_size = -1;
  85     (void) mca_base_component_var_register (&mca_fs_pvfs2_component.fsm_version,
  86                                             "stripe_size", "stripe size of a file over pvfs2",
  87                                             MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  88                                             OPAL_INFO_LVL_9,
  89                                             MCA_BASE_VAR_SCOPE_READONLY, &mca_fs_pvfs2_stripe_size);
  90     mca_fs_pvfs2_stripe_width = -1;
  91     (void) mca_base_component_var_register (&mca_fs_pvfs2_component.fsm_version,
  92                                             "stripe_width", "stripe width of a file over pvfs2",
  93                                             MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  94                                             OPAL_INFO_LVL_9,
  95                                             MCA_BASE_VAR_SCOPE_READONLY, &mca_fs_pvfs2_stripe_width);
  96 
  97     return OMPI_SUCCESS;
  98 }

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