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
28
29
30
31
32
33
34
35
36
37
38
39
40
41 #ifndef OMPI_COMMON_DLL_DEFS_H
42 #define OMPI_COMMON_DLL_DEFS_H
43
44 #include "msgq_interface.h"
45
46
47
48
49
50 typedef struct
51 {
52
53 const struct mqs_image_callbacks * image_callbacks;
54
55
56 struct {
57 mqs_type *type;
58 int size;
59 struct {
60 int opal_list_next;
61 } offset;
62 } opal_list_item_t;
63 struct {
64 mqs_type *type;
65 int size;
66 struct {
67 int opal_list_sentinel;
68 } offset;
69 } opal_list_t;
70 struct {
71 mqs_type *type;
72 int size;
73 } opal_free_list_item_t;
74 struct {
75 mqs_type *type;
76 int size;
77 struct {
78 int fl_frag_class;
79 int fl_mpool;
80 int fl_frag_size;
81 int fl_frag_alignment;
82 int fl_allocations;
83 int fl_max_to_alloc;
84 int fl_num_per_alloc;
85 int fl_num_allocated;
86 } offset;
87 } opal_free_list_t;
88 struct {
89 mqs_type *type;
90 int size;
91 struct {
92 int ht_table;
93 int ht_table_size;
94 int ht_size;
95 int ht_mask;
96 } offset;
97 } opal_hash_table_t;
98
99 struct {
100 mqs_type *type;
101 int size;
102 struct {
103 int req_type;
104 int req_status;
105 int req_complete;
106 int req_state;
107 int req_f_to_c_index;
108 } offset;
109 } ompi_request_t;
110 struct {
111 mqs_type *type;
112 int size;
113 struct {
114 int req_addr;
115 int req_count;
116 int req_peer;
117 int req_tag;
118 int req_comm;
119 int req_datatype;
120 int req_proc;
121 int req_sequence;
122 int req_type;
123 int req_pml_complete;
124 } offset;
125 } mca_pml_base_request_t;
126 struct {
127 mqs_type *type;
128 int size;
129 struct {
130 int req_addr;
131 int req_bytes_packed;
132 int req_send_mode;
133 } offset;
134 } mca_pml_base_send_request_t;
135 struct {
136 mqs_type *type;
137 int size;
138 struct {
139 int req_bytes_packed;
140 } offset;
141 } mca_pml_base_recv_request_t;
142 #if 0
143
144 struct {
145 mqs_type *type;
146 int size;
147 struct {
148 int hdr;
149 int request;
150 } offset;
151 } mca_pml_ob1_recv_frag_t;
152 struct {
153 mqs_type *type;
154 int size;
155 struct {
156 int hdr_type;
157 int hdr_flags;
158 } offset;
159 } mca_pml_ob1_common_hdr_t;
160 struct {
161 mqs_type *type;
162 int size;
163 struct {
164 int hdr_common;
165 int hdr_ctx;
166 int hdr_src;
167 int hdr_tag;
168 int hdr_seq;
169 } offset;
170 } mca_pml_ob1_match_hdr_t;
171 #endif
172
173 struct {
174 mqs_type *type;
175 int size;
176 struct {
177 int lowest_free;
178 int number_free;
179 int size;
180 int addr;
181 } offset;
182 } opal_pointer_array_t;
183
184 struct {
185 mqs_type *type;
186 int size;
187 struct {
188 int grp_proc_count;
189 int grp_proc_pointers;
190 int grp_my_rank;
191 int grp_flags;
192 } offset;
193 } ompi_group_t;
194
195 struct {
196 mqs_type *type;
197 int size;
198 struct {
199 int c_name;
200 int c_contextid;
201 int c_my_rank;
202 int c_local_group;
203 int c_remote_group;
204 int c_flags;
205 int c_f_to_c_index;
206 int c_topo;
207 int c_keyhash;
208 } offset;
209 } ompi_communicator_t;
210
211 struct {
212 mqs_type *type;
213 int size;
214 struct {
215 int mtc;
216 struct {
217 int ndims;
218 int dims;
219 int periods;
220 int coords;
221 } mtc_cart;
222 struct {
223 int nnodes;
224 int index;
225 int edges;
226 } mtc_graph;
227 struct {
228 int in;
229 int inw;
230 int out;
231 int outw;
232 int indegree;
233 int outdegree;
234 int weighted;
235 } mtc_dist_graph;
236 int reorder;
237 } offset;
238 } mca_topo_base_module_t;
239
240 struct {
241 mqs_type *type;
242 int size;
243 struct {
244 int MPI_SOURCE;
245 int MPI_TAG;
246 int MPI_ERROR;
247 int _cancelled;
248 size_t _ucount;
249 } offset;
250 } ompi_status_public_t;
251
252 struct {
253 mqs_type *type;
254 int size;
255 struct {
256 int size;
257 int name;
258 } offset;
259 } ompi_datatype_t;
260
261
262 void *extra;
263 } mpi_image_info;
264
265
266
267
268 typedef struct
269 {
270 const struct mqs_process_callbacks * process_callbacks;
271
272 mqs_target_type_sizes sizes;
273
274
275 void *extra;
276 } mpi_process_info;
277
278
279
280
281
282 #define mqs_malloc (mqs_basic_entrypoints->mqs_malloc_fp)
283 #define mqs_free (mqs_basic_entrypoints->mqs_free_fp)
284 #define mqs_prints (mqs_basic_entrypoints->mqs_dprints_fp)
285 #define mqs_put_image_info (mqs_basic_entrypoints->mqs_put_image_info_fp)
286 #define mqs_get_image_info (mqs_basic_entrypoints->mqs_get_image_info_fp)
287 #define mqs_put_process_info (mqs_basic_entrypoints->mqs_put_process_info_fp)
288 #define mqs_get_process_info (mqs_basic_entrypoints->mqs_get_process_info_fp)
289
290
291
292
293 #define mqs_find_type (i_info->image_callbacks->mqs_find_type_fp)
294 #define mqs_field_offset (i_info->image_callbacks->mqs_field_offset_fp)
295 #define mqs_sizeof (i_info->image_callbacks->mqs_sizeof_fp)
296 #define mqs_get_type_sizes (i_info->image_callbacks->mqs_get_type_sizes_fp)
297 #define mqs_find_function (i_info->image_callbacks->mqs_find_function_fp)
298 #define mqs_find_symbol (i_info->image_callbacks->mqs_find_symbol_fp)
299
300 #define mqs_get_image (p_info->process_callbacks->mqs_get_image_fp)
301 #define mqs_get_global_rank (p_info->process_callbacks->mqs_get_global_rank_fp)
302 #define mqs_fetch_data (p_info->process_callbacks->mqs_fetch_data_fp)
303 #define mqs_target_to_host (p_info->process_callbacks->mqs_target_to_host_fp)
304
305
306 extern const mqs_basic_callbacks *mqs_basic_entrypoints;
307
308
309 int ompi_fill_in_type_info(mqs_image *image, char **message);
310
311
312 mqs_taddr_t ompi_fetch_pointer(mqs_process *proc, mqs_taddr_t addr,
313 mpi_process_info *p_info);
314
315
316 mqs_tword_t ompi_fetch_int(mqs_process *proc, mqs_taddr_t addr,
317 mpi_process_info *p_info);
318
319
320 mqs_tword_t ompi_fetch_bool(mqs_process *proc, mqs_taddr_t addr,
321 mpi_process_info *p_info);
322
323
324 mqs_taddr_t ompi_fetch_size_t(mqs_process *proc, mqs_taddr_t addr,
325 mpi_process_info *p_info);
326
327
328 int ompi_fetch_opal_pointer_array_info(mqs_process *proc, mqs_taddr_t addr,
329 mpi_process_info *p_info,
330 int *size, int *lowest_free,
331 int *number_free);
332 int ompi_fetch_opal_pointer_array_item(mqs_process *proc, mqs_taddr_t addr,
333 mpi_process_info *p_info, int index,
334 mqs_taddr_t *item);
335 #define OMPI_MAX_VER_SIZE 256
336 int ompi_get_lib_version(char *buf, int size);
337 #endif