Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:47:22

0001 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
0002 /*
0003  * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
0004  *                         University Research and Technology
0005  *                         Corporation.  All rights reserved.
0006  * Copyright (c) 2004-2006 The University of Tennessee and The University
0007  *                         of Tennessee Research Foundation.  All rights
0008  *                         reserved.
0009  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
0010  *                         University of Stuttgart.  All rights reserved.
0011  * Copyright (c) 2004-2005 The Regents of the University of California.
0012  *                         All rights reserved.
0013  * Copyright (c) 2008      Cisco Systems, Inc.  All rights reserved.
0014  * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
0015  *                         reserved.
0016  * Copyright (c) 2016-2020 Intel, Inc.  All rights reserved.
0017  * Copyright (c) 2021-2023 Nanook Consulting.  All rights reserved.
0018  * $COPYRIGHT$
0019  *
0020  * Additional copyrights may follow
0021  *
0022  * $HEADER$
0023  */
0024 
0025 /**
0026  * @file
0027  *
0028  * This is the private declarations for the MCA variable system.
0029  * This file is internal to the MCA variable system and should not
0030  * need to be used by any other elements in PMIX except the
0031  * special case of the ompi_info command.
0032  *
0033  * All the rest of the doxygen documentation in this file is marked as
0034  * "internal" and won't show up unless you specifically tell doxygen
0035  * to generate internal documentation (by default, it is skipped).
0036  */
0037 
0038 #ifndef PMIX_MCA_BASE_VAR_INTERNAL_H
0039 #define PMIX_MCA_BASE_VAR_INTERNAL_H
0040 
0041 #include "src/include/pmix_config.h"
0042 
0043 #include "src/class/pmix_hash_table.h"
0044 #include "src/class/pmix_list.h"
0045 #include "src/class/pmix_object.h"
0046 #include "src/class/pmix_pointer_array.h"
0047 #include "src/class/pmix_value_array.h"
0048 #include "src/mca/base/pmix_mca_base_var.h"
0049 
0050 BEGIN_C_DECLS
0051 
0052 /* Internal flags start at bit 16 */
0053 #define PMIX_MCA_BASE_VAR_FLAG_EXTERNAL_MASK 0x0000ffff
0054 
0055 #define PMIX_VAR_FLAG_ISSET(var, flag) (!!((var).mbp_flags & (flag)))
0056 #define PMIX_VAR_IS_VALID(var)        (!!((var).mbv_flags & PMIX_MCA_BASE_VAR_FLAG_VALID))
0057 #define PMIX_VAR_IS_SYNONYM(var)      (!!((var).mbv_flags & PMIX_MCA_BASE_VAR_FLAG_SYNONYM))
0058 #define PMIX_VAR_IS_DEPRECATED(var)   (!!((var).mbv_flags & PMIX_MCA_BASE_VAR_FLAG_DEPRECATED))
0059 
0060 PMIX_EXPORT extern const char *pmix_var_type_names[];
0061 PMIX_EXPORT extern const size_t pmix_var_type_sizes[];
0062 PMIX_EXPORT extern bool pmix_mca_base_var_initialized;
0063 PMIX_EXPORT extern pmix_list_t pmix_mca_base_var_file_values;
0064 PMIX_EXPORT extern pmix_list_t pmix_mca_base_var_override_values;
0065 
0066 /**
0067  * \internal
0068  *
0069  * Structure for holding param names and values read in from files.
0070  */
0071 struct pmix_mca_base_var_file_value_t {
0072     /** Allow this to be an PMIX OBJ */
0073     pmix_list_item_t super;
0074 
0075     /** Parameter name */
0076     char *mbvfv_var;
0077     /** Parameter value */
0078     char *mbvfv_value;
0079     /** File it came from */
0080     char *mbvfv_file;
0081     /** Line it came from */
0082     int mbvfv_lineno;
0083 };
0084 
0085 /**
0086  * \internal
0087  *
0088  * Convenience typedef
0089  */
0090 typedef struct pmix_mca_base_var_file_value_t pmix_mca_base_var_file_value_t;
0091 
0092 /**
0093  * Object declaration for pmix_mca_base_var_file_value_t
0094  */
0095 PMIX_CLASS_DECLARATION(pmix_mca_base_var_file_value_t);
0096 
0097 /**
0098  * \internal
0099  *
0100  * Get a group
0101  *
0102  * @param[in]  group_index Group index
0103  * @param[out] group       Returned group if it exists
0104  * @param[in]  invalidok   Return group even if it has been deregistered
0105  */
0106 PMIX_EXPORT int pmix_mca_base_var_group_get_internal(const int group_index,
0107                                                      pmix_mca_base_var_group_t **group,
0108                                                      bool invalidok);
0109 
0110 /**
0111  * \internal
0112  *
0113  * Parse a parameter file.
0114  */
0115 PMIX_EXPORT int pmix_mca_base_parse_paramfile(const char *paramfile, pmix_list_t *list);
0116 
0117 /**
0118  * \internal
0119  *
0120  * Add a variable to a group
0121  */
0122 PMIX_EXPORT int pmix_mca_base_var_group_add_var(const int group_index, const int param_index);
0123 
0124 /**
0125  * \internal
0126  *
0127  * Generate a full name with _ between all of the non-NULL arguments
0128  */
0129 PMIX_EXPORT int pmix_mca_base_var_generate_full_name4(const char *project, const char *framework,
0130                                                       const char *component, const char *variable,
0131                                                       char **full_name);
0132 
0133 /**
0134  * \internal
0135  *
0136  * Call save_value callback for generated internal mca parameter storing env variables
0137  */
0138 PMIX_EXPORT int pmix_mca_base_internal_env_store(void);
0139 
0140 /**
0141  * \internal
0142  *
0143  * Initialize/finalize MCA variable groups
0144  */
0145 PMIX_EXPORT int pmix_mca_base_var_group_init(void);
0146 PMIX_EXPORT int pmix_mca_base_var_group_finalize(void);
0147 
0148 END_C_DECLS
0149 
0150 #endif /* PMIX_MCA_BASE_VAR_INTERNAL_H */