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) 2013 University of Houston. 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 "sharedfp_lockedfile.h"
31 #include "mpi.h"
32
33 /*
34 * Public string showing the sharedfp lockedfile component version number
35 */
36 const char *mca_sharedfp_lockedfile_component_version_string =
37 "OMPI/MPI lockedfile SHAREDFP MCA component version " OMPI_VERSION;
38 /*
39 * Global variables
40 */
41 int mca_sharedfp_lockedfile_priority=10;
42 int mca_sharedfp_lockedfile_verbose=0;
43
44 static int lockedfile_register(void);
45
46 /*
47 * Instantiate the public struct with all of our public information
48 * and pointers to our public functions in it
49 */
50 mca_sharedfp_base_component_2_0_0_t mca_sharedfp_lockedfile_component = {
51
52 /* First, the mca_component_t struct containing meta information
53 about the component itself */
54
55 .sharedfpm_version = {
56 MCA_SHAREDFP_BASE_VERSION_2_0_0,
57
58 /* Component name and version */
59 .mca_component_name = "lockedfile",
60 MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
61 OMPI_RELEASE_VERSION),
62 .mca_register_component_params = lockedfile_register,
63 },
64 .sharedfpm_data = {
65 /* This component is checkpointable */
66 MCA_BASE_METADATA_PARAM_CHECKPOINT
67 },
68 .sharedfpm_init_query = mca_sharedfp_lockedfile_component_init_query, /* get thread level */
69 .sharedfpm_file_query = mca_sharedfp_lockedfile_component_file_query, /* get priority and actions */
70 .sharedfpm_file_unquery = mca_sharedfp_lockedfile_component_file_unquery, /* undo what was done by previous function */
71 };
72
73 static int lockedfile_register(void)
74 {
75 mca_sharedfp_lockedfile_priority = 10;
76 (void) mca_base_component_var_register(&mca_sharedfp_lockedfile_component.sharedfpm_version,
77 "priority", "Priority of the lockedfile sharedfp component",
78 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
79 OPAL_INFO_LVL_9,
80 MCA_BASE_VAR_SCOPE_READONLY, &mca_sharedfp_lockedfile_priority);
81 mca_sharedfp_lockedfile_verbose = 0;
82 (void) mca_base_component_var_register(&mca_sharedfp_lockedfile_component.sharedfpm_version,
83 "verbose", "Verbosity of the lockedfile sharedfp component",
84 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
85 OPAL_INFO_LVL_9,
86 MCA_BASE_VAR_SCOPE_READONLY, &mca_sharedfp_lockedfile_verbose);
87
88 return OMPI_SUCCESS;
89 }