1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 #ifndef PMIX_GDS_BASE_H_
28 #define PMIX_GDS_BASE_H_
29
30 #include <src/include/pmix_config.h>
31
32
33 #ifdef HAVE_SYS_TIME_H
34 #include <sys/time.h>
35 #endif
36 #ifdef HAVE_STRING_H
37 #include <string.h>
38 #endif
39
40 #include "src/class/pmix_list.h"
41 #include "src/mca/mca.h"
42 #include "src/mca/base/pmix_mca_base_framework.h"
43
44 #include "src/mca/gds/gds.h"
45
46
47 BEGIN_C_DECLS
48
49
50
51
52 PMIX_EXPORT extern pmix_mca_base_framework_t pmix_gds_base_framework;
53
54
55
56
57
58
59 PMIX_EXPORT pmix_status_t pmix_gds_base_select(pmix_info_t info[], size_t ninfo);
60
61
62
63
64 struct pmix_gds_base_active_module_t {
65 pmix_list_item_t super;
66 int pri;
67 pmix_gds_base_module_t *module;
68 pmix_gds_base_component_t *component;
69 };
70 typedef struct pmix_gds_base_active_module_t pmix_gds_base_active_module_t;
71 PMIX_CLASS_DECLARATION(pmix_gds_base_active_module_t);
72
73
74
75 struct pmix_gds_globals_t {
76 pmix_list_t actives;
77 bool initialized;
78 char *all_mods;
79 };
80
81 typedef enum {
82 PMIX_MODEX_KEY_INVALID = -1,
83 PMIX_MODEX_KEY_NATIVE_FMT,
84 PMIX_MODEX_KEY_KEYMAP_FMT,
85 PMIX_MODEX_KEY_MAX
86 } pmix_gds_modex_key_fmt_t;
87
88
89 typedef uint8_t pmix_gds_modex_blob_info_t;
90
91 #define PMIX_GDS_COLLECT_BIT 0x0001
92 #define PMIX_GDS_KEYMAP_BIT 0x0002
93
94 #define PMIX_GDS_KEYMAP_IS_SET(byte) (PMIX_GDS_KEYMAP_BIT & (byte))
95 #define PMIX_GDS_COLLECT_IS_SET(byte) (PMIX_GDS_COLLECT_BIT & (byte))
96
97 typedef struct pmix_gds_globals_t pmix_gds_globals_t;
98
99 typedef void * pmix_gds_base_ctx_t;
100 typedef pmix_status_t (*pmix_gds_base_store_modex_cb_fn_t)(pmix_gds_base_ctx_t ctx,
101 pmix_proc_t *proc,
102 pmix_gds_modex_key_fmt_t key_fmt,
103 char **kmap,
104 pmix_buffer_t *pbkt);
105
106 PMIX_EXPORT extern pmix_gds_globals_t pmix_gds_globals;
107
108
109
110
111 PMIX_EXPORT char* pmix_gds_base_get_available_modules(void);
112
113
114
115 PMIX_EXPORT pmix_gds_base_module_t* pmix_gds_base_assign_module(pmix_info_t *info,
116 size_t ninfo);
117
118
119
120
121
122
123
124
125 PMIX_EXPORT pmix_status_t pmix_gds_base_setup_fork(const pmix_proc_t *proc,
126 char ***env);
127
128 PMIX_EXPORT pmix_status_t pmix_gds_base_store_modex(struct pmix_namespace_t *nspace,
129 pmix_buffer_t * buff,
130 pmix_gds_base_ctx_t ctx,
131 pmix_gds_base_store_modex_cb_fn_t cb_fn,
132 void *cbdata);
133
134 PMIX_EXPORT
135 pmix_status_t pmix_gds_base_modex_pack_kval(pmix_gds_modex_key_fmt_t key_fmt,
136 pmix_buffer_t *buf, char ***kmap,
137 pmix_kval_t *kv);
138
139 PMIX_EXPORT
140 pmix_status_t pmix_gds_base_modex_unpack_kval(pmix_gds_modex_key_fmt_t key_fmt,
141 pmix_buffer_t *buf, char **kmap,
142 pmix_kval_t *kv);
143 END_C_DECLS
144
145 #endif