OpenMPI  0.1.1
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"
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;
55 
56 
57 /**
58  * \internal
59  *
60  * Entry for holding the information about an MCA parameter and its
61  * default value.
62  */
64  /** Allow this to be an OPAL OBJ */
66 
67  /** Enum indicating the type of the parameter (integer or string) */
69  /** String of the type name, or NULL */
71  /** String of the component name */
73  /** String of the parameter name */
75  /** Full parameter name, in case it is not
76  <type>_<component>_<param> */
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. */
87 
88  /** Whether this is internal (not meant to be seen / modified by
89  users) or not */
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) */
95  /** Whether this MCA parameter (*and* all of its synonyms) is
96  deprecated or not */
98  /** Whether the warning message for the deprecated MCA param has
99  been shown already or not */
101  /** Help message associated with this parameter */
103 
104  /** Environment variable name */
106 
107  /** Default value of the parameter */
109 
110  /** Whether or not we have a file value */
112  /** Value of the parameter found in a file */
114  /** File the value came from */
116 
117  /** Whether or not we have an override value */
119  /** Value of the parameter override set via API */
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  */
135 
136 
137 /**
138  * \internal
139  *
140  * Structure for holding param names and values read in from files.
141  */
143  /** Allow this to be an OPAL OBJ */
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  */
159 
160 /**
161  * Object declaration for mca_base_param_file_value_t
162  */
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 */
bool mbp_file_value_set
Whether or not we have a file value.
Definition: mca_base_param_internal.h:111
mca_base_param_type_t mbp_type
Enum indicating the type of the parameter (integer or string)
Definition: mca_base_param_internal.h:68
This file presents the MCA parameter interface.
char * mbp_type_name
String of the type name, or NULL.
Definition: mca_base_param_internal.h:70
mca_base_param_storage_t mbp_default_value
Default value of the parameter.
Definition: mca_base_param_internal.h:108
char * stringval
String value.
Definition: mca_base_param_internal.h:53
mca_base_param_storage_t mbp_file_value
Value of the parameter found in a file.
Definition: mca_base_param_internal.h:113
Definition: mca_base_param_internal.h:63
opal_object_t mbp_super
Allow this to be an OPAL OBJ.
Definition: mca_base_param_internal.h:65
char * mbpfv_value
Parameter value.
Definition: mca_base_param_internal.h:149
opal_list_item_t super
Allow this to be an OPAL OBJ.
Definition: mca_base_param_internal.h:144
Definition: mca_base_param_internal.h:49
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
char * mbp_source_file
File the value came from.
Definition: mca_base_param_internal.h:115
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
Definition: opal_list.h:98
bool mbp_override_value_set
Whether or not we have an override value.
Definition: mca_base_param_internal.h:118
opal_list_t * mbp_synonyms
List of synonym names for this parameter.
Definition: mca_base_param_internal.h:86
char * mbp_env_var_name
Environment variable name.
Definition: mca_base_param_internal.h:105
char * mbp_full_name
Full parameter name, in case it is not __
Definition: mca_base_param_internal.h:77
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_base_param_file_value_t)
Object declaration for mca_base_param_file_value_t.
char * mbpfv_param
Parameter name.
Definition: mca_base_param_internal.h:147
bool mbp_internal
Whether this is internal (not meant to be seen / modified by users) or not.
Definition: mca_base_param_internal.h:90
Base object.
Definition: opal_object.h:182
char * mbpfv_file
File it came from.
Definition: mca_base_param_internal.h:151
Definition: opal_list.h:147
int intval
Integer value.
Definition: mca_base_param_internal.h:51
bool mbp_deprecated
Whether this MCA parameter (and all of its synonyms) is deprecated or not.
Definition: mca_base_param_internal.h:97
Definition: mca_base_param_internal.h:142
mca_base_param_type_t
The types of MCA parameters.
Definition: mca_base_param.h:68
A simple C-language object-oriented system with single inheritance and ownership-based memory managem...
char * mbp_component_name
String of the component name.
Definition: mca_base_param_internal.h:72
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
char * mbp_param_name
String of the parameter name.
Definition: mca_base_param_internal.h:74
char * mbp_help_msg
Help message associated with this parameter.
Definition: mca_base_param_internal.h:102
mca_base_param_storage_t mbp_override_value
Value of the parameter override set via API.
Definition: mca_base_param_internal.h:120