2004-07-14 00:24:26 +04:00
|
|
|
/*
|
2007-03-29 05:00:33 +04:00
|
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2006-08-23 04:29:35 +04:00
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2008-07-10 05:44:51 +04:00
|
|
|
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-07-14 00:24:26 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-08-31 13:49:56 +04:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* This is the private declarations for the MCA parameter system.
|
|
|
|
* This file is internal to the MCA parameter system and should not
|
|
|
|
* need to be used by any other elements in Open MPI except the
|
|
|
|
* special case of the ompi_info command.
|
|
|
|
*
|
|
|
|
* All the rest of the doxygen documentation in this file is marked as
|
|
|
|
* "internal" and won't show up unless you specifically tell doxygen
|
|
|
|
* to generate internal documentation (by default, it is skipped).
|
2004-07-14 00:24:26 +04:00
|
|
|
*/
|
|
|
|
|
2007-03-29 05:00:33 +04:00
|
|
|
#ifndef OPAL_MCA_BASE_PARAM_INTERNAL_H
|
|
|
|
#define OPAL_MCA_BASE_PARAM_INTERNAL_H
|
2004-07-14 00:24:26 +04:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal_config.h"
|
2004-07-14 00:24:26 +04:00
|
|
|
|
2005-07-03 20:06:07 +04:00
|
|
|
#include "opal/class/opal_object.h"
|
2005-07-03 20:22:16 +04:00
|
|
|
#include "opal/class/opal_list.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/base/mca_base_param.h"
|
2004-07-14 00:24:26 +04:00
|
|
|
|
2009-08-20 15:42:18 +04:00
|
|
|
BEGIN_C_DECLS
|
2006-08-23 04:29:35 +04:00
|
|
|
|
2004-07-14 00:24:26 +04:00
|
|
|
/**
|
2004-08-31 13:49:56 +04:00
|
|
|
* \internal
|
|
|
|
*
|
2004-07-14 00:24:26 +04:00
|
|
|
* Types for MCA parameters.
|
|
|
|
*/
|
|
|
|
typedef union {
|
2004-08-31 13:49:56 +04:00
|
|
|
/** Integer value */
|
|
|
|
int intval;
|
|
|
|
/** String value */
|
|
|
|
char *stringval;
|
2004-07-14 00:24:26 +04:00
|
|
|
} mca_base_param_storage_t;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2004-08-31 13:49:56 +04:00
|
|
|
* \internal
|
|
|
|
*
|
2004-07-14 00:24:26 +04:00
|
|
|
* Entry for holding the information about an MCA parameter and its
|
|
|
|
* default value.
|
|
|
|
*/
|
|
|
|
struct mca_base_param_t {
|
2007-03-29 05:00:33 +04:00
|
|
|
/** Allow this to be an OPAL OBJ */
|
2005-07-03 20:06:07 +04:00
|
|
|
opal_object_t mbp_super;
|
2004-08-31 13:49:56 +04:00
|
|
|
|
|
|
|
/** Enum indicating the type of the parameter (integer or string) */
|
|
|
|
mca_base_param_type_t mbp_type;
|
|
|
|
/** String of the type name, or NULL */
|
|
|
|
char *mbp_type_name;
|
|
|
|
/** String of the component name */
|
|
|
|
char *mbp_component_name;
|
|
|
|
/** String of the parameter name */
|
|
|
|
char *mbp_param_name;
|
|
|
|
/** Full parameter name, in case it is not
|
|
|
|
<type>_<component>_<param> */
|
|
|
|
char *mbp_full_name;
|
2008-07-10 05:44:51 +04:00
|
|
|
|
|
|
|
/** List of synonym names for this parameter. This *must* be a
|
|
|
|
pointer (vs. a plain opal_list_t) because we copy this whole
|
|
|
|
struct into a new param for permanent storage
|
|
|
|
(opal_vale_array_append_item()), and the internal pointers in
|
|
|
|
the opal_list_t will be invalid when that happens. Hence, we
|
|
|
|
simply keep a pointer to an external opal_list_t. Synonyms
|
|
|
|
are uncommon enough that this is not a big performance hit. */
|
|
|
|
opal_list_t *mbp_synonyms;
|
2005-02-10 07:37:13 +03:00
|
|
|
|
|
|
|
/** Whether this is internal (not meant to be seen / modified by
|
|
|
|
users) or not */
|
|
|
|
bool mbp_internal;
|
2005-08-02 02:38:17 +04:00
|
|
|
/** Whether this value is changable from the default value that
|
|
|
|
was registered (e.g., when true, useful for reporting values,
|
|
|
|
like the value of the GM library that was linked against) */
|
|
|
|
bool mbp_read_only;
|
2008-07-10 05:44:51 +04:00
|
|
|
/** Whether this MCA parameter (*and* all of its synonyms) is
|
|
|
|
deprecated or not */
|
|
|
|
bool mbp_deprecated;
|
|
|
|
/** Whether the warning message for the deprecated MCA param has
|
|
|
|
been shown already or not */
|
|
|
|
bool mbp_deprecated_warning_shown;
|
2005-08-02 02:38:17 +04:00
|
|
|
/** Help message associated with this parameter */
|
|
|
|
char *mbp_help_msg;
|
2004-08-31 13:49:56 +04:00
|
|
|
|
|
|
|
/** Environment variable name */
|
|
|
|
char *mbp_env_var_name;
|
|
|
|
|
|
|
|
/** Default value of the parameter */
|
|
|
|
mca_base_param_storage_t mbp_default_value;
|
|
|
|
|
|
|
|
/** Whether or not we have a file value */
|
|
|
|
bool mbp_file_value_set;
|
|
|
|
/** Value of the parameter found in a file */
|
|
|
|
mca_base_param_storage_t mbp_file_value;
|
2008-08-01 00:00:45 +04:00
|
|
|
/** File the value came from */
|
|
|
|
char *mbp_source_file;
|
2004-08-31 13:49:56 +04:00
|
|
|
|
|
|
|
/** Whether or not we have an override value */
|
|
|
|
bool mbp_override_value_set;
|
|
|
|
/** Value of the parameter override set via API */
|
|
|
|
mca_base_param_storage_t mbp_override_value;
|
2004-07-14 00:24:26 +04:00
|
|
|
};
|
|
|
|
/**
|
2004-08-31 13:49:56 +04:00
|
|
|
* \internal
|
|
|
|
*
|
2004-07-14 00:24:26 +04:00
|
|
|
* Convenience typedef.
|
|
|
|
*/
|
|
|
|
typedef struct mca_base_param_t mca_base_param_t;
|
|
|
|
|
|
|
|
/**
|
2004-08-31 13:49:56 +04:00
|
|
|
* \internal
|
|
|
|
*
|
2004-07-14 00:24:26 +04:00
|
|
|
* Object delcataion for mca_base_param_t
|
|
|
|
*/
|
2006-08-23 04:29:35 +04:00
|
|
|
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_base_param_t);
|
2004-07-14 00:24:26 +04:00
|
|
|
|
|
|
|
|
2004-08-31 13:49:56 +04:00
|
|
|
/**
|
|
|
|
* \internal
|
|
|
|
*
|
|
|
|
* Structure for holding param names and values read in from files.
|
|
|
|
*/
|
|
|
|
struct mca_base_param_file_value_t {
|
2007-03-29 05:00:33 +04:00
|
|
|
/** Allow this to be an OPAL OBJ */
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_item_t super;
|
2004-08-31 13:49:56 +04:00
|
|
|
|
|
|
|
/** Parameter name */
|
|
|
|
char *mbpfv_param;
|
|
|
|
/** Parameter value */
|
|
|
|
char *mbpfv_value;
|
2008-08-01 00:00:45 +04:00
|
|
|
/** File it came from */
|
|
|
|
char *mbpfv_file;
|
2004-08-31 13:49:56 +04:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* \internal
|
|
|
|
*
|
|
|
|
* Convenience typedef
|
|
|
|
*/
|
|
|
|
typedef struct mca_base_param_file_value_t mca_base_param_file_value_t;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Object declaration for mca_base_param_file_value_t
|
|
|
|
*/
|
2006-08-23 04:29:35 +04:00
|
|
|
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_base_param_file_value_t);
|
2004-08-31 13:49:56 +04:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \internal
|
|
|
|
*
|
|
|
|
* Global list of params and values read in from MCA parameter files
|
|
|
|
*/
|
2006-08-20 19:54:04 +04:00
|
|
|
OPAL_DECLSPEC extern opal_list_t mca_base_param_file_values;
|
2004-08-31 13:49:56 +04:00
|
|
|
|
2006-08-23 04:29:35 +04:00
|
|
|
/**
|
|
|
|
* \internal
|
|
|
|
*
|
|
|
|
* Parse a parameter file.
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC int mca_base_parse_paramfile(const char *paramfile);
|
2004-08-31 13:49:56 +04:00
|
|
|
|
2009-08-20 15:42:18 +04:00
|
|
|
END_C_DECLS
|
2004-08-31 13:49:56 +04:00
|
|
|
|
2007-03-29 05:00:33 +04:00
|
|
|
#endif /* OPAL_MCA_BASE_PARAM_INTERNAL_H */
|