OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

mca_base_param_internal.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2006 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
13 * $COPYRIGHT$
14 *
15 * Additional copyrights may follow
16 *
17 * $HEADER$
18 */
19
20 /**
21 * @file
22 *
23 * This is the private declarations for the MCA parameter system.
24 * This file is internal to the MCA parameter system and should not
25 * need to be used by any other elements in Open MPI except the
26 * special case of the ompi_info command.
27 *
28 * All the rest of the doxygen documentation in this file is marked as
29 * "internal" and won't show up unless you specifically tell doxygen
30 * to generate internal documentation (by default, it is skipped).
31 */
32
33 #ifndef OPAL_MCA_BASE_PARAM_INTERNAL_H
34 #define OPAL_MCA_BASE_PARAM_INTERNAL_H
35
36 #include "opal_config.h"
37
38 #include "opal/class/opal_object.h"
39 #include "opal/class/opal_list.h"
40 #include "opal/mca/base/mca_base_param.h"
41
42 BEGIN_C_DECLS
43
44 /**
45 * \internal
46 *
47 * Types for MCA parameters.
48 */
49 typedef union {
50 /** Integer value */
51 int intval;
52 /** String value */
53 char *stringval;
54 } mca_base_param_storage_t;
55
56
57 /**
58 * \internal
59 *
60 * Entry for holding the information about an MCA parameter and its
61 * default value.
62 */
63 struct mca_base_param_t {
64 /** Allow this to be an OPAL OBJ */
65 opal_object_t mbp_super;
66
67 /** Enum indicating the type of the parameter (integer or string) */
68 mca_base_param_type_t mbp_type;
69 /** String of the type name, or NULL */
70 char *mbp_type_name;
71 /** String of the component name */
72 char *mbp_component_name;
73 /** String of the parameter name */
74 char *mbp_param_name;
75 /** Full parameter name, in case it is not
76 <type>_<component>_<param> */
77 char *mbp_full_name;
78
79 /** List of synonym names for this parameter. This *must* be a
80 pointer (vs. a plain opal_list_t) because we copy this whole
81 struct into a new param for permanent storage
82 (opal_vale_array_append_item()), and the internal pointers in
83 the opal_list_t will be invalid when that happens. Hence, we
84 simply keep a pointer to an external opal_list_t. Synonyms
85 are uncommon enough that this is not a big performance hit. */
86 opal_list_t *mbp_synonyms;
87
88 /** Whether this is internal (not meant to be seen / modified by
89 users) or not */
90 bool mbp_internal;
91 /** Whether this value is changable from the default value that
92 was registered (e.g., when true, useful for reporting values,
93 like the value of the GM library that was linked against) */
94 bool mbp_read_only;
95 /** Whether this MCA parameter (*and* all of its synonyms) is
96 deprecated or not */
97 bool mbp_deprecated;
98 /** Whether the warning message for the deprecated MCA param has
99 been shown already or not */
100 bool mbp_deprecated_warning_shown;
101 /** Help message associated with this parameter */
102 char *mbp_help_msg;
103
104 /** Environment variable name */
105 char *mbp_env_var_name;
106
107 /** Default value of the parameter */
108 mca_base_param_storage_t mbp_default_value;
109
110 /** Whether or not we have a file value */
111 bool mbp_file_value_set;
112 /** Value of the parameter found in a file */
113 mca_base_param_storage_t mbp_file_value;
114 /** File the value came from */
115 char *mbp_source_file;
116
117 /** Whether or not we have an override value */
118 bool mbp_override_value_set;
119 /** Value of the parameter override set via API */
120 mca_base_param_storage_t mbp_override_value;
121 };
122 /**
123 * \internal
124 *
125 * Convenience typedef.
126 */
127 typedef struct mca_base_param_t mca_base_param_t;
128
129 /**
130 * \internal
131 *
132 * Object delcataion for mca_base_param_t
133 */
134 OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_base_param_t);
135
136
137 /**
138 * \internal
139 *
140 * Structure for holding param names and values read in from files.
141 */
142 struct mca_base_param_file_value_t {
143 /** Allow this to be an OPAL OBJ */
144 opal_list_item_t super;
145
146 /** Parameter name */
147 char *mbpfv_param;
148 /** Parameter value */
149 char *mbpfv_value;
150 /** File it came from */
151 char *mbpfv_file;
152 };
153 /**
154 * \internal
155 *
156 * Convenience typedef
157 */
158 typedef struct mca_base_param_file_value_t mca_base_param_file_value_t;
159
160 /**
161 * Object declaration for mca_base_param_file_value_t
162 */
163 OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_base_param_file_value_t);
164
165
166 /**
167 * \internal
168 *
169 * Global list of params and values read in from MCA parameter files
170 */
171 OPAL_DECLSPEC extern opal_list_t mca_base_param_file_values;
172
173 /**
174 * \internal
175 *
176 * Parse a parameter file.
177 */
178 OPAL_DECLSPEC int mca_base_parse_paramfile(const char *paramfile);
179
180 END_C_DECLS
181
182 #endif /* OPAL_MCA_BASE_PARAM_INTERNAL_H */
mca_base_param_t::mbp_file_value_set
bool mbp_file_value_set
Whether or not we have a file value.
Definition: mca_base_param_internal.h:111
mca_base_param_t::mbp_type
mca_base_param_type_t mbp_type
Enum indicating the type of the parameter (integer or string)
Definition: mca_base_param_internal.h:68
mca_base_param.h
This file presents the MCA parameter interface.
mca_base_param_t::mbp_type_name
char * mbp_type_name
String of the type name, or NULL.
Definition: mca_base_param_internal.h:70
mca_base_param_t::mbp_default_value
mca_base_param_storage_t mbp_default_value
Default value of the parameter.
Definition: mca_base_param_internal.h:108
mca_base_param_storage_t::stringval
char * stringval
String value.
Definition: mca_base_param_internal.h:53
mca_base_param_t::mbp_file_value
mca_base_param_storage_t mbp_file_value
Value of the parameter found in a file.
Definition: mca_base_param_internal.h:113
mca_base_param_t
Definition: mca_base_param_internal.h:63
mca_base_param_t::mbp_super
opal_object_t mbp_super
Allow this to be an OPAL OBJ.
Definition: mca_base_param_internal.h:65
mca_base_param_file_value_t::mbpfv_value
char * mbpfv_value
Parameter value.
Definition: mca_base_param_internal.h:149
mca_base_param_file_value_t::super
opal_list_item_t super
Allow this to be an OPAL OBJ.
Definition: mca_base_param_internal.h:144
mca_base_param_storage_t
Definition: mca_base_param_internal.h:49
mca_base_param_t::mbp_read_only
bool mbp_read_only
Whether this value is changable from the default value that was registered (e.g., when true...
Definition: mca_base_param_internal.h:94
mca_base_param_t::mbp_source_file
char * mbp_source_file
File the value came from.
Definition: mca_base_param_internal.h:115
opal_list.h
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
opal_list_item_t
Definition: opal_list.h:98
mca_base_param_t::mbp_override_value_set
bool mbp_override_value_set
Whether or not we have an override value.
Definition: mca_base_param_internal.h:118
mca_base_param_t::mbp_synonyms
opal_list_t * mbp_synonyms
List of synonym names for this parameter.
Definition: mca_base_param_internal.h:86
mca_base_param_t::mbp_env_var_name
char * mbp_env_var_name
Environment variable name.
Definition: mca_base_param_internal.h:105
mca_base_param_t::mbp_full_name
char * mbp_full_name
Full parameter name, in case it is not __
Definition: mca_base_param_internal.h:77
OBJ_CLASS_DECLARATION
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_base_param_file_value_t)
Object declaration for mca_base_param_file_value_t.
mca_base_param_file_value_t::mbpfv_param
char * mbpfv_param
Parameter name.
Definition: mca_base_param_internal.h:147
mca_base_param_t::mbp_internal
bool mbp_internal
Whether this is internal (not meant to be seen / modified by users) or not.
Definition: mca_base_param_internal.h:90
opal_object_t
Base object.
Definition: opal_object.h:182
mca_base_param_file_value_t::mbpfv_file
char * mbpfv_file
File it came from.
Definition: mca_base_param_internal.h:151
opal_list_t
Definition: opal_list.h:147
mca_base_param_storage_t::intval
int intval
Integer value.
Definition: mca_base_param_internal.h:51
mca_base_param_t::mbp_deprecated
bool mbp_deprecated
Whether this MCA parameter (and all of its synonyms) is deprecated or not.
Definition: mca_base_param_internal.h:97
mca_base_param_file_value_t
Definition: mca_base_param_internal.h:142
mca_base_param_type_t
mca_base_param_type_t
The types of MCA parameters.
Definition: mca_base_param.h:68
opal_object.h
A simple C-language object-oriented system with single inheritance and ownership-based memory managem...
mca_base_param_t::mbp_component_name
char * mbp_component_name
String of the component name.
Definition: mca_base_param_internal.h:72
mca_base_param_t::mbp_deprecated_warning_shown
bool mbp_deprecated_warning_shown
Whether the warning message for the deprecated MCA param has been shown already or not...
Definition: mca_base_param_internal.h:100
mca_base_param_t::mbp_param_name
char * mbp_param_name
String of the parameter name.
Definition: mca_base_param_internal.h:74
mca_base_param_t::mbp_help_msg
char * mbp_help_msg
Help message associated with this parameter.
Definition: mca_base_param_internal.h:102
mca_base_param_t::mbp_override_value
mca_base_param_storage_t mbp_override_value
Value of the parameter override set via API.
Definition: mca_base_param_internal.h:120