1
1
openmpi/opal/mca/base/mca_base_param_internal.h

167 строки
4.2 KiB
C
Исходник Обычный вид История

/*
* Copyright (c) 2004-2005 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
- New capability for MCA parameters to be read from files. Order of resolution is now (effectively): - read from MPI keyval (if associated) - read from command line - read from environment - read from file More capabilities will be added shortly for developers to programatically set MCA parameter values - Create [empty but commented] system-wide MCA param file that gets installed at $sysconf/openmpi-mca-params.conf (i.e., $prefix/etc/openmpi-mca-params.conf) - The following files are opened and read (in order): 1. $sysconf/openmpi-mca-params.conf 2. $HOME/.openmpi/mca-params.conf Specifically, the values in 2) will override the values in 1) (so users can override system-wide defaults. - Update MCA string params to allow for "~/" in the middle to be expanded to the user's home directory. - Added to default value of MCA parameter component_path to be: $pkglibdir:$HOME/.openmpi/components $pkglibdir is typically $prefix/lib/openmpi. So now both of these directories will be searched for components at run time (in all Open MPI executables, including ompi_info). Note that this is an MCA parameter, so it, too, can be changed at run-time. - Updated all docs to match this behavior -- some is \internal, so it doesn't show unless you tell doxygen to generate internal docs (which is not the default) - update ompi_info to handle new behavior; ompi_info --param now shows the *current* default value (i.e., it will look in the environment and/or files to find out what the default values are -- so if you change a value in $HOME/.openmpi/mca-params.conf, it should be reflected in "ompi_info --param all all") - updated bunches of doxygen docs to match - this diff is slightly artifically large -- some of the changes are converstions to 4 space tabs (I re-indented my own code that previously used 2 space tabs) This commit was SVN r2408.
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).
*/
#ifndef OMPI_MCA_BASE_PARAM_INTERNAL_H
#define OMPI_MCA_BASE_PARAM_INTERNAL_H
#include "ompi_config.h"
#include "opal/class/opal_object.h"
#include "opal/class/opal_list.h"
#include "class/opal_hash_table.h"
#include "mca/base/mca_base_param.h"
/**
- New capability for MCA parameters to be read from files. Order of resolution is now (effectively): - read from MPI keyval (if associated) - read from command line - read from environment - read from file More capabilities will be added shortly for developers to programatically set MCA parameter values - Create [empty but commented] system-wide MCA param file that gets installed at $sysconf/openmpi-mca-params.conf (i.e., $prefix/etc/openmpi-mca-params.conf) - The following files are opened and read (in order): 1. $sysconf/openmpi-mca-params.conf 2. $HOME/.openmpi/mca-params.conf Specifically, the values in 2) will override the values in 1) (so users can override system-wide defaults. - Update MCA string params to allow for "~/" in the middle to be expanded to the user's home directory. - Added to default value of MCA parameter component_path to be: $pkglibdir:$HOME/.openmpi/components $pkglibdir is typically $prefix/lib/openmpi. So now both of these directories will be searched for components at run time (in all Open MPI executables, including ompi_info). Note that this is an MCA parameter, so it, too, can be changed at run-time. - Updated all docs to match this behavior -- some is \internal, so it doesn't show unless you tell doxygen to generate internal docs (which is not the default) - update ompi_info to handle new behavior; ompi_info --param now shows the *current* default value (i.e., it will look in the environment and/or files to find out what the default values are -- so if you change a value in $HOME/.openmpi/mca-params.conf, it should be reflected in "ompi_info --param all all") - updated bunches of doxygen docs to match - this diff is slightly artifically large -- some of the changes are converstions to 4 space tabs (I re-indented my own code that previously used 2 space tabs) This commit was SVN r2408.
2004-08-31 13:49:56 +04:00
* \internal
*
* Types for MCA parameters.
*/
typedef union {
- New capability for MCA parameters to be read from files. Order of resolution is now (effectively): - read from MPI keyval (if associated) - read from command line - read from environment - read from file More capabilities will be added shortly for developers to programatically set MCA parameter values - Create [empty but commented] system-wide MCA param file that gets installed at $sysconf/openmpi-mca-params.conf (i.e., $prefix/etc/openmpi-mca-params.conf) - The following files are opened and read (in order): 1. $sysconf/openmpi-mca-params.conf 2. $HOME/.openmpi/mca-params.conf Specifically, the values in 2) will override the values in 1) (so users can override system-wide defaults. - Update MCA string params to allow for "~/" in the middle to be expanded to the user's home directory. - Added to default value of MCA parameter component_path to be: $pkglibdir:$HOME/.openmpi/components $pkglibdir is typically $prefix/lib/openmpi. So now both of these directories will be searched for components at run time (in all Open MPI executables, including ompi_info). Note that this is an MCA parameter, so it, too, can be changed at run-time. - Updated all docs to match this behavior -- some is \internal, so it doesn't show unless you tell doxygen to generate internal docs (which is not the default) - update ompi_info to handle new behavior; ompi_info --param now shows the *current* default value (i.e., it will look in the environment and/or files to find out what the default values are -- so if you change a value in $HOME/.openmpi/mca-params.conf, it should be reflected in "ompi_info --param all all") - updated bunches of doxygen docs to match - this diff is slightly artifically large -- some of the changes are converstions to 4 space tabs (I re-indented my own code that previously used 2 space tabs) This commit was SVN r2408.
2004-08-31 13:49:56 +04:00
/** Integer value */
int intval;
/** String value */
char *stringval;
} mca_base_param_storage_t;
/**
- New capability for MCA parameters to be read from files. Order of resolution is now (effectively): - read from MPI keyval (if associated) - read from command line - read from environment - read from file More capabilities will be added shortly for developers to programatically set MCA parameter values - Create [empty but commented] system-wide MCA param file that gets installed at $sysconf/openmpi-mca-params.conf (i.e., $prefix/etc/openmpi-mca-params.conf) - The following files are opened and read (in order): 1. $sysconf/openmpi-mca-params.conf 2. $HOME/.openmpi/mca-params.conf Specifically, the values in 2) will override the values in 1) (so users can override system-wide defaults. - Update MCA string params to allow for "~/" in the middle to be expanded to the user's home directory. - Added to default value of MCA parameter component_path to be: $pkglibdir:$HOME/.openmpi/components $pkglibdir is typically $prefix/lib/openmpi. So now both of these directories will be searched for components at run time (in all Open MPI executables, including ompi_info). Note that this is an MCA parameter, so it, too, can be changed at run-time. - Updated all docs to match this behavior -- some is \internal, so it doesn't show unless you tell doxygen to generate internal docs (which is not the default) - update ompi_info to handle new behavior; ompi_info --param now shows the *current* default value (i.e., it will look in the environment and/or files to find out what the default values are -- so if you change a value in $HOME/.openmpi/mca-params.conf, it should be reflected in "ompi_info --param all all") - updated bunches of doxygen docs to match - this diff is slightly artifically large -- some of the changes are converstions to 4 space tabs (I re-indented my own code that previously used 2 space tabs) This commit was SVN r2408.
2004-08-31 13:49:56 +04:00
* \internal
*
* Entry for holding the information about an MCA parameter and its
* default value.
*/
struct mca_base_param_t {
- New capability for MCA parameters to be read from files. Order of resolution is now (effectively): - read from MPI keyval (if associated) - read from command line - read from environment - read from file More capabilities will be added shortly for developers to programatically set MCA parameter values - Create [empty but commented] system-wide MCA param file that gets installed at $sysconf/openmpi-mca-params.conf (i.e., $prefix/etc/openmpi-mca-params.conf) - The following files are opened and read (in order): 1. $sysconf/openmpi-mca-params.conf 2. $HOME/.openmpi/mca-params.conf Specifically, the values in 2) will override the values in 1) (so users can override system-wide defaults. - Update MCA string params to allow for "~/" in the middle to be expanded to the user's home directory. - Added to default value of MCA parameter component_path to be: $pkglibdir:$HOME/.openmpi/components $pkglibdir is typically $prefix/lib/openmpi. So now both of these directories will be searched for components at run time (in all Open MPI executables, including ompi_info). Note that this is an MCA parameter, so it, too, can be changed at run-time. - Updated all docs to match this behavior -- some is \internal, so it doesn't show unless you tell doxygen to generate internal docs (which is not the default) - update ompi_info to handle new behavior; ompi_info --param now shows the *current* default value (i.e., it will look in the environment and/or files to find out what the default values are -- so if you change a value in $HOME/.openmpi/mca-params.conf, it should be reflected in "ompi_info --param all all") - updated bunches of doxygen docs to match - this diff is slightly artifically large -- some of the changes are converstions to 4 space tabs (I re-indented my own code that previously used 2 space tabs) This commit was SVN r2408.
2004-08-31 13:49:56 +04:00
/** Allow this to be an OMPI OBJ */
opal_object_t mbp_super;
- New capability for MCA parameters to be read from files. Order of resolution is now (effectively): - read from MPI keyval (if associated) - read from command line - read from environment - read from file More capabilities will be added shortly for developers to programatically set MCA parameter values - Create [empty but commented] system-wide MCA param file that gets installed at $sysconf/openmpi-mca-params.conf (i.e., $prefix/etc/openmpi-mca-params.conf) - The following files are opened and read (in order): 1. $sysconf/openmpi-mca-params.conf 2. $HOME/.openmpi/mca-params.conf Specifically, the values in 2) will override the values in 1) (so users can override system-wide defaults. - Update MCA string params to allow for "~/" in the middle to be expanded to the user's home directory. - Added to default value of MCA parameter component_path to be: $pkglibdir:$HOME/.openmpi/components $pkglibdir is typically $prefix/lib/openmpi. So now both of these directories will be searched for components at run time (in all Open MPI executables, including ompi_info). Note that this is an MCA parameter, so it, too, can be changed at run-time. - Updated all docs to match this behavior -- some is \internal, so it doesn't show unless you tell doxygen to generate internal docs (which is not the default) - update ompi_info to handle new behavior; ompi_info --param now shows the *current* default value (i.e., it will look in the environment and/or files to find out what the default values are -- so if you change a value in $HOME/.openmpi/mca-params.conf, it should be reflected in "ompi_info --param all all") - updated bunches of doxygen docs to match - this diff is slightly artifically large -- some of the changes are converstions to 4 space tabs (I re-indented my own code that previously used 2 space tabs) This commit was SVN r2408.
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;
/** Whether this is internal (not meant to be seen / modified by
users) or not */
bool mbp_internal;
/** 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;
/** Help message associated with this parameter */
char *mbp_help_msg;
- New capability for MCA parameters to be read from files. Order of resolution is now (effectively): - read from MPI keyval (if associated) - read from command line - read from environment - read from file More capabilities will be added shortly for developers to programatically set MCA parameter values - Create [empty but commented] system-wide MCA param file that gets installed at $sysconf/openmpi-mca-params.conf (i.e., $prefix/etc/openmpi-mca-params.conf) - The following files are opened and read (in order): 1. $sysconf/openmpi-mca-params.conf 2. $HOME/.openmpi/mca-params.conf Specifically, the values in 2) will override the values in 1) (so users can override system-wide defaults. - Update MCA string params to allow for "~/" in the middle to be expanded to the user's home directory. - Added to default value of MCA parameter component_path to be: $pkglibdir:$HOME/.openmpi/components $pkglibdir is typically $prefix/lib/openmpi. So now both of these directories will be searched for components at run time (in all Open MPI executables, including ompi_info). Note that this is an MCA parameter, so it, too, can be changed at run-time. - Updated all docs to match this behavior -- some is \internal, so it doesn't show unless you tell doxygen to generate internal docs (which is not the default) - update ompi_info to handle new behavior; ompi_info --param now shows the *current* default value (i.e., it will look in the environment and/or files to find out what the default values are -- so if you change a value in $HOME/.openmpi/mca-params.conf, it should be reflected in "ompi_info --param all all") - updated bunches of doxygen docs to match - this diff is slightly artifically large -- some of the changes are converstions to 4 space tabs (I re-indented my own code that previously used 2 space tabs) This commit was SVN r2408.
2004-08-31 13:49:56 +04:00
/** Keyval value for MPI attribute parameters */
int mbp_keyval;
/** 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;
/** 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;
};
/**
- New capability for MCA parameters to be read from files. Order of resolution is now (effectively): - read from MPI keyval (if associated) - read from command line - read from environment - read from file More capabilities will be added shortly for developers to programatically set MCA parameter values - Create [empty but commented] system-wide MCA param file that gets installed at $sysconf/openmpi-mca-params.conf (i.e., $prefix/etc/openmpi-mca-params.conf) - The following files are opened and read (in order): 1. $sysconf/openmpi-mca-params.conf 2. $HOME/.openmpi/mca-params.conf Specifically, the values in 2) will override the values in 1) (so users can override system-wide defaults. - Update MCA string params to allow for "~/" in the middle to be expanded to the user's home directory. - Added to default value of MCA parameter component_path to be: $pkglibdir:$HOME/.openmpi/components $pkglibdir is typically $prefix/lib/openmpi. So now both of these directories will be searched for components at run time (in all Open MPI executables, including ompi_info). Note that this is an MCA parameter, so it, too, can be changed at run-time. - Updated all docs to match this behavior -- some is \internal, so it doesn't show unless you tell doxygen to generate internal docs (which is not the default) - update ompi_info to handle new behavior; ompi_info --param now shows the *current* default value (i.e., it will look in the environment and/or files to find out what the default values are -- so if you change a value in $HOME/.openmpi/mca-params.conf, it should be reflected in "ompi_info --param all all") - updated bunches of doxygen docs to match - this diff is slightly artifically large -- some of the changes are converstions to 4 space tabs (I re-indented my own code that previously used 2 space tabs) This commit was SVN r2408.
2004-08-31 13:49:56 +04:00
* \internal
*
* Convenience typedef.
*/
typedef struct mca_base_param_t mca_base_param_t;
/**
- New capability for MCA parameters to be read from files. Order of resolution is now (effectively): - read from MPI keyval (if associated) - read from command line - read from environment - read from file More capabilities will be added shortly for developers to programatically set MCA parameter values - Create [empty but commented] system-wide MCA param file that gets installed at $sysconf/openmpi-mca-params.conf (i.e., $prefix/etc/openmpi-mca-params.conf) - The following files are opened and read (in order): 1. $sysconf/openmpi-mca-params.conf 2. $HOME/.openmpi/mca-params.conf Specifically, the values in 2) will override the values in 1) (so users can override system-wide defaults. - Update MCA string params to allow for "~/" in the middle to be expanded to the user's home directory. - Added to default value of MCA parameter component_path to be: $pkglibdir:$HOME/.openmpi/components $pkglibdir is typically $prefix/lib/openmpi. So now both of these directories will be searched for components at run time (in all Open MPI executables, including ompi_info). Note that this is an MCA parameter, so it, too, can be changed at run-time. - Updated all docs to match this behavior -- some is \internal, so it doesn't show unless you tell doxygen to generate internal docs (which is not the default) - update ompi_info to handle new behavior; ompi_info --param now shows the *current* default value (i.e., it will look in the environment and/or files to find out what the default values are -- so if you change a value in $HOME/.openmpi/mca-params.conf, it should be reflected in "ompi_info --param all all") - updated bunches of doxygen docs to match - this diff is slightly artifically large -- some of the changes are converstions to 4 space tabs (I re-indented my own code that previously used 2 space tabs) This commit was SVN r2408.
2004-08-31 13:49:56 +04:00
* \internal
*
* Object delcataion for mca_base_param_t
*/
OBJ_CLASS_DECLARATION(mca_base_param_t);
- New capability for MCA parameters to be read from files. Order of resolution is now (effectively): - read from MPI keyval (if associated) - read from command line - read from environment - read from file More capabilities will be added shortly for developers to programatically set MCA parameter values - Create [empty but commented] system-wide MCA param file that gets installed at $sysconf/openmpi-mca-params.conf (i.e., $prefix/etc/openmpi-mca-params.conf) - The following files are opened and read (in order): 1. $sysconf/openmpi-mca-params.conf 2. $HOME/.openmpi/mca-params.conf Specifically, the values in 2) will override the values in 1) (so users can override system-wide defaults. - Update MCA string params to allow for "~/" in the middle to be expanded to the user's home directory. - Added to default value of MCA parameter component_path to be: $pkglibdir:$HOME/.openmpi/components $pkglibdir is typically $prefix/lib/openmpi. So now both of these directories will be searched for components at run time (in all Open MPI executables, including ompi_info). Note that this is an MCA parameter, so it, too, can be changed at run-time. - Updated all docs to match this behavior -- some is \internal, so it doesn't show unless you tell doxygen to generate internal docs (which is not the default) - update ompi_info to handle new behavior; ompi_info --param now shows the *current* default value (i.e., it will look in the environment and/or files to find out what the default values are -- so if you change a value in $HOME/.openmpi/mca-params.conf, it should be reflected in "ompi_info --param all all") - updated bunches of doxygen docs to match - this diff is slightly artifically large -- some of the changes are converstions to 4 space tabs (I re-indented my own code that previously used 2 space tabs) This commit was SVN r2408.
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 {
/** Allow this to be an OMPI OBJ */
opal_list_item_t super;
- New capability for MCA parameters to be read from files. Order of resolution is now (effectively): - read from MPI keyval (if associated) - read from command line - read from environment - read from file More capabilities will be added shortly for developers to programatically set MCA parameter values - Create [empty but commented] system-wide MCA param file that gets installed at $sysconf/openmpi-mca-params.conf (i.e., $prefix/etc/openmpi-mca-params.conf) - The following files are opened and read (in order): 1. $sysconf/openmpi-mca-params.conf 2. $HOME/.openmpi/mca-params.conf Specifically, the values in 2) will override the values in 1) (so users can override system-wide defaults. - Update MCA string params to allow for "~/" in the middle to be expanded to the user's home directory. - Added to default value of MCA parameter component_path to be: $pkglibdir:$HOME/.openmpi/components $pkglibdir is typically $prefix/lib/openmpi. So now both of these directories will be searched for components at run time (in all Open MPI executables, including ompi_info). Note that this is an MCA parameter, so it, too, can be changed at run-time. - Updated all docs to match this behavior -- some is \internal, so it doesn't show unless you tell doxygen to generate internal docs (which is not the default) - update ompi_info to handle new behavior; ompi_info --param now shows the *current* default value (i.e., it will look in the environment and/or files to find out what the default values are -- so if you change a value in $HOME/.openmpi/mca-params.conf, it should be reflected in "ompi_info --param all all") - updated bunches of doxygen docs to match - this diff is slightly artifically large -- some of the changes are converstions to 4 space tabs (I re-indented my own code that previously used 2 space tabs) This commit was SVN r2408.
2004-08-31 13:49:56 +04:00
/** Parameter name */
char *mbpfv_param;
/** Parameter value */
char *mbpfv_value;
};
/**
* \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
*/
OBJ_CLASS_DECLARATION(mca_base_param_file_value_t);
/**
* \internal
*
* Global list of params and values read in from MCA parameter files
*/
OMPI_DECLSPEC extern opal_list_t mca_base_param_file_values;
- New capability for MCA parameters to be read from files. Order of resolution is now (effectively): - read from MPI keyval (if associated) - read from command line - read from environment - read from file More capabilities will be added shortly for developers to programatically set MCA parameter values - Create [empty but commented] system-wide MCA param file that gets installed at $sysconf/openmpi-mca-params.conf (i.e., $prefix/etc/openmpi-mca-params.conf) - The following files are opened and read (in order): 1. $sysconf/openmpi-mca-params.conf 2. $HOME/.openmpi/mca-params.conf Specifically, the values in 2) will override the values in 1) (so users can override system-wide defaults. - Update MCA string params to allow for "~/" in the middle to be expanded to the user's home directory. - Added to default value of MCA parameter component_path to be: $pkglibdir:$HOME/.openmpi/components $pkglibdir is typically $prefix/lib/openmpi. So now both of these directories will be searched for components at run time (in all Open MPI executables, including ompi_info). Note that this is an MCA parameter, so it, too, can be changed at run-time. - Updated all docs to match this behavior -- some is \internal, so it doesn't show unless you tell doxygen to generate internal docs (which is not the default) - update ompi_info to handle new behavior; ompi_info --param now shows the *current* default value (i.e., it will look in the environment and/or files to find out what the default values are -- so if you change a value in $HOME/.openmpi/mca-params.conf, it should be reflected in "ompi_info --param all all") - updated bunches of doxygen docs to match - this diff is slightly artifically large -- some of the changes are converstions to 4 space tabs (I re-indented my own code that previously used 2 space tabs) This commit was SVN r2408.
2004-08-31 13:49:56 +04:00
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/**
* \internal
*
* Parse a parameter file.
*/
int mca_base_parse_paramfile(const char *paramfile);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif /* OMPI_MCA_BASE_PARAM_INTERNAL_H */