File indexing completed on 2025-02-23 10:12:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 #ifndef PMIX_GDS_BASE_H_
0029 #define PMIX_GDS_BASE_H_
0030
0031 #include "src/include/pmix_config.h"
0032
0033 #ifdef HAVE_SYS_TIME_H
0034 # include <sys/time.h> /* for struct timeval */
0035 #endif
0036 #ifdef HAVE_STRING_H
0037 # include <string.h>
0038 #endif
0039
0040 #include "src/class/pmix_list.h"
0041 #include "src/mca/base/pmix_mca_base_framework.h"
0042 #include "src/mca/mca.h"
0043
0044 #include "src/mca/gds/gds.h"
0045
0046 BEGIN_C_DECLS
0047
0048
0049
0050
0051 PMIX_EXPORT extern pmix_mca_base_framework_t pmix_gds_base_framework;
0052
0053
0054
0055
0056
0057
0058 PMIX_EXPORT pmix_status_t pmix_gds_base_select(pmix_info_t info[], size_t ninfo);
0059
0060
0061
0062
0063 struct pmix_gds_base_active_module_t {
0064 pmix_list_item_t super;
0065 int pri;
0066 pmix_gds_base_module_t *module;
0067 pmix_gds_base_component_t *component;
0068 };
0069 typedef struct pmix_gds_base_active_module_t pmix_gds_base_active_module_t;
0070 PMIX_CLASS_DECLARATION(pmix_gds_base_active_module_t);
0071
0072
0073 struct pmix_gds_globals_t {
0074 pmix_list_t actives;
0075 bool initialized;
0076 bool selected;
0077 char *all_mods;
0078 };
0079
0080 typedef enum {
0081 PMIX_MODEX_KEY_INVALID = -1,
0082 PMIX_MODEX_KEY_NATIVE_FMT,
0083 PMIX_MODEX_KEY_KEYMAP_FMT,
0084 PMIX_MODEX_KEY_MAX
0085 } pmix_gds_modex_key_fmt_t;
0086
0087
0088 typedef uint8_t pmix_gds_modex_blob_info_t;
0089
0090 #define PMIX_GDS_COLLECT_BIT 0x0001
0091 #define PMIX_GDS_KEYMAP_BIT 0x0002
0092
0093 #define PMIX_GDS_KEYMAP_IS_SET(byte) (PMIX_GDS_KEYMAP_BIT & (byte))
0094 #define PMIX_GDS_COLLECT_IS_SET(byte) (PMIX_GDS_COLLECT_BIT & (byte))
0095
0096 typedef struct pmix_gds_globals_t pmix_gds_globals_t;
0097
0098 typedef void *pmix_gds_base_ctx_t;
0099 typedef pmix_status_t (*pmix_gds_base_store_modex_cb_fn_t)(pmix_gds_base_ctx_t ctx,
0100 pmix_proc_t *proc,
0101 pmix_gds_modex_key_fmt_t key_fmt,
0102 char **kmap, pmix_buffer_t *pbkt);
0103
0104 PMIX_EXPORT extern pmix_gds_globals_t pmix_gds_globals;
0105
0106
0107
0108
0109 PMIX_EXPORT char *pmix_gds_base_get_available_modules(void);
0110
0111
0112 PMIX_EXPORT pmix_gds_base_module_t *pmix_gds_base_assign_module(pmix_info_t *info, size_t ninfo);
0113
0114
0115
0116
0117
0118
0119
0120
0121 PMIX_EXPORT pmix_status_t pmix_gds_base_setup_fork(const pmix_proc_t *proc, char ***env);
0122
0123 PMIX_EXPORT pmix_status_t pmix_gds_base_store_modex(struct pmix_namespace_t *nspace,
0124 pmix_buffer_t *buff, pmix_gds_base_ctx_t ctx,
0125 pmix_gds_base_store_modex_cb_fn_t cb_fn,
0126 void *cbdata);
0127
0128 PMIX_EXPORT
0129 pmix_status_t pmix_gds_base_modex_pack_kval(pmix_gds_modex_key_fmt_t key_fmt, pmix_buffer_t *buf,
0130 char ***kmap, pmix_kval_t *kv);
0131
0132 PMIX_EXPORT
0133 pmix_status_t pmix_gds_base_modex_unpack_kval(pmix_gds_modex_key_fmt_t key_fmt, pmix_buffer_t *buf,
0134 char **kmap, pmix_kval_t *kv);
0135 END_C_DECLS
0136
0137 #endif