diff --git a/opal/mca/base/mca_base_param.c b/opal/mca/base/mca_base_param.c index 124d415ca2..ecebf7a4de 100644 --- a/opal/mca/base/mca_base_param.c +++ b/opal/mca/base/mca_base_param.c @@ -35,11 +35,6 @@ #include "opal/class/opal_value_array.h" #include "opal/util/show_help.h" #include "opal/class/opal_hash_table.h" -#if 0 -/* JMS commented out for now -- see lookup_keyvals() below for an - explanation */ -#include "ompi/attribute/attribute.h" -#endif #include "opal/util/printf.h" #include "opal/util/argv.h" #include "opal/mca/mca.h" @@ -124,9 +119,6 @@ static bool param_set_override(size_t index, mca_base_param_type_t type); static bool lookup_override(mca_base_param_t *param, mca_base_param_storage_t *storage); -static bool lookup_keyvals(mca_base_param_t *param, - mca_base_param_storage_t *storage, - opal_hash_table_t *attrs); static bool lookup_env(mca_base_param_t *param, mca_base_param_storage_t *storage); static bool lookup_file(mca_base_param_t *param, @@ -481,36 +473,6 @@ int mca_base_param_reg_syn_name(int index_orig, syn_param_name, deprecated); } -/* - * Associate a keyval with a parameter index - */ -int mca_base_param_kv_associate(int index, int keyval) -{ - size_t len; - mca_base_param_t *array; - - if (!initialized) { - return OPAL_ERROR; - } - - len = opal_value_array_get_size(&mca_base_params); - if (((size_t) index) > len) { - return OPAL_ERROR; - } - - /* We have a valid entry (remember that we never delete MCA - parameters, so if the index is >0 and mbp_keyval) { - - /* Use the stringval member of the union because it's definitely - big enough to handle both (int) and (char*) */ - - err = ompi_attr_get(attrs, param->mbp_keyval, - &storage->stringval, &flag); - if (OPAL_SUCCESS == err && 1 == flag) { - - /* Because of alignment weirdness between (void*) and int, we - must grab the lower sizeof(int) bytes from the (char*) in - stringval, in case sizeof(int) != sizeof(char*). */ - - if (MCA_BASE_PARAM_TYPE_INT == param->mbp_type) { - storage->intval = *((int *) (storage->stringval + - sizeof(void *) - sizeof(int))); - } - - /* Nothing to do for string -- we already have the value loaded - in the right place */ - - return true; - } - } - - /* Either this param has not keyval or we didn't find the keyval */ - - return false; -#endif -} - - /* * Lookup a param in the environment */ @@ -2150,7 +2024,6 @@ static void param_constructor(mca_base_param_t *p) p->mbp_full_name = NULL; p->mbp_help_msg = NULL; - p->mbp_keyval = -1; p->mbp_env_var_name = NULL; p->mbp_default_value.stringval = NULL; diff --git a/opal/mca/base/mca_base_param.h b/opal/mca/base/mca_base_param.h index 122635543a..b2877fa4a6 100644 --- a/opal/mca/base/mca_base_param.h +++ b/opal/mca/base/mca_base_param.h @@ -29,7 +29,6 @@ * * - Creating MCA parameters * -# Register a parameter, get an index back - * -# Optionally associate that index with an attribute keyval * - Using MCA parameters * -# Lookup a "normal" parameter value on a specific index, or * -# Lookup an attribute parameter on a specific index and @@ -41,8 +40,6 @@ * * - An "override" location that is only available to be set via the * mca_base_param API. - * - If the parameter has an MPI attribute keyval associated with it, - * see if there is a value assigned that can be used. * - Look for an environment variable corresponding to the MCA * parameter. * - See if a file contains the MCA parameter (MCA parameter files are @@ -91,8 +88,6 @@ typedef enum { MCA_BASE_PARAM_SOURCE_ENV, /** The value came from a file */ MCA_BASE_PARAM_SOURCE_FILE, - /** The value came from a keyval */ - MCA_BASE_PARAM_SOURCE_KEYVAL, /** The value came a "set" API call */ MCA_BASE_PARAM_SOURCE_OVERRIDE, @@ -473,31 +468,6 @@ extern "C" { const char *syn_param_name, bool deprecated); - /** - * Associate a communicator/datatype/window keyval with an MCA - * parameter. - * - * @param index The index of the parameter to use. - * @param keyval The keyval to associate it with. - * - * @returns OPAL_SUCCESS Upon success. - * @returns OPAL_ERROR If the index value is invalid. - * - * For an index value that was previously returned by - * mca_base_param_register_int() or - * mca_base_param_register_string(), the corresponding MCA parameter - * can be associated with a communicator, datatype, or window - * attribute keyval. - * - * After using this function, you can use any of the four lookup - * functions (mca_base_param_lookup_int(), - * mca_base_param_lookup_string(), mca_base_param_kv_lookup_int(), - * and mca_base_param_kv_lookup_string()), but only the "kv" - * versions will cross reference and attempt to find parameter - * values on attributes. - */ - OPAL_DECLSPEC int mca_base_param_kv_associate(int index, int keyval); - /** * Look up an integer MCA parameter. * @@ -516,30 +486,6 @@ extern "C" { */ OPAL_DECLSPEC int mca_base_param_lookup_int(int index, int *value); - /** - * Look up an integer MCA parameter, to include looking in - * attributes. - * - * @param index Index previous returned from - * mca_base_param_register_int(). - * @param attrs Object containing attributes to be searched. - * @param value Pointer to int where the parameter value will - * be stored. - * - * @return OPAL_ERROR Upon failure. The contents of value are - * undefined. - * @return OPAL_SUCCESS Upon success. value will be filled with the - * parameter's current value. - * - * This function is identical to mca_base_param_lookup_int() except - * that it looks in attributes \em first to find the parameter - * value. The function mca_base_param_kv_associate() must have been - * called first to associate a keyval with the index. - */ - OPAL_DECLSPEC int mca_base_param_kv_lookup_int(int index, - struct opal_hash_table_t *attrs, - int *value); - /** * Look up a string MCA parameter. * @@ -565,29 +511,6 @@ extern "C" { */ OPAL_DECLSPEC int mca_base_param_lookup_string(int index, char **value); - /** - * Look up a string MCA parameter, to include looking in attributes. - * - * @param index [in] Index previous returned from - * mca_base_param_register_string(). - * @param attrs [in] Object containing attributes to be searched. - * @param value [out] Pointer to (char *) where the parameter value - * will be stored. - * - * @return OPAL_ERROR Upon failure. The contents of value are - * undefined. - * @return OPAL_SUCCESS Upon success. value will be filled with the - * parameter's current value. - * - * This function is identical to mca_base_param_lookup_string() - * except that it looks in attributes \em first to find the - * parameter value. The function mca_base_param_kv_associate() must - * have been called first to associate a keyval with the index. - */ - OPAL_DECLSPEC int mca_base_param_kv_lookup_string(int index, - struct opal_hash_table_t *attrs, - char **value); - /** * Lookup the source of an MCA parameter's value * diff --git a/opal/mca/base/mca_base_param_internal.h b/opal/mca/base/mca_base_param_internal.h index f1c42f50f8..22f4ad5293 100644 --- a/opal/mca/base/mca_base_param_internal.h +++ b/opal/mca/base/mca_base_param_internal.h @@ -104,8 +104,6 @@ struct mca_base_param_t { /** Help message associated with this parameter */ char *mbp_help_msg; - /** Keyval value for MPI attribute parameters */ - int mbp_keyval; /** Environment variable name */ char *mbp_env_var_name;