OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

ompi_common_dll_defs.h
1 /*
2 * Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
3 * Copyright (c) 2004-2010 The University of Tennessee and The University
4 * of Tennessee Research Foundation. All rights
5 * reserved.
6 * $COPYRIGHT$
7 *
8 * Additional copyrights may follow
9 *
10 * $HEADER$
11 */
12
13 /**********************************************************************
14 * Copyright (C) 2000-2004 by Etnus, LLC.
15 * Copyright (C) 1999 by Etnus, Inc.
16 * Copyright (C) 1997-1998 Dolphin Interconnect Solutions Inc.
17 *
18 * Permission is hereby granted to use, reproduce, prepare derivative
19 * works, and to redistribute to others.
20 *
21 * DISCLAIMER
22 *
23 * Neither Dolphin Interconnect Solutions, Etnus LLC, nor any of their
24 * employees, makes any warranty express or implied, or assumes any
25 * legal liability or responsibility for the accuracy, completeness,
26 * or usefulness of any information, apparatus, product, or process
27 * disclosed, or represents that its use would not infringe privately
28 * owned rights.
29 *
30 * This code was written by
31 * James Cownie: Dolphin Interconnect Solutions. <jcownie@dolphinics.com>
32 * Etnus LLC <jcownie@etnus.com>
33 **********************************************************************/
34
35 #ifndef OMPI_COMMON_DLL_DEFS_H
36 #define OMPI_COMMON_DLL_DEFS_H
37
38 #include "msgq_interface.h"
39
40 /***********************************************************************
41 * Information associated with a specific executable image. Common
42 * across all DLLs.
43 */
44 typedef struct
45 {
46 /* Functions needed here */
47 const struct mqs_image_callbacks * image_callbacks;
48
49 /* basic structures */
50 struct {
51 mqs_type *type;
52 int size;
53 struct {
54 int opal_list_next;
55 } offset;
56 } opal_list_item_t;
57 struct {
58 mqs_type *type;
59 int size;
60 struct {
61 int opal_list_sentinel;
62 } offset;
63 } opal_list_t;
64 struct {
65 mqs_type *type;
66 int size;
67 } ompi_free_list_item_t;
68 struct {
69 mqs_type *type;
70 int size;
71 struct {
72 int fl_frag_class; /* opal_class_t* */
73 int fl_mpool; /* struct mca_mpool_base_module_t* */
74 int fl_frag_size; /* size_t */
75 int fl_frag_alignment; /* size_t */
76 int fl_allocations; /* opal_list_t */
77 int fl_max_to_alloc; /* size_t */
78 int fl_num_per_alloc; /* size_t */
79 int fl_num_allocated; /* size_t */
80 } offset;
81 } ompi_free_list_t;
82 struct {
83 mqs_type *type;
84 int size;
85 struct {
86 int ht_table;
87 int ht_table_size;
88 int ht_size;
89 int ht_mask;
90 } offset;
91 } opal_hash_table_t;
92 /* requests structures */
93 struct {
94 mqs_type *type;
95 int size;
96 struct {
97 int req_type;
98 int req_status;
99 int req_complete;
100 int req_state;
101 int req_f_to_c_index;
102 } offset;
103 } ompi_request_t;
104 struct {
105 mqs_type *type;
106 int size;
107 struct {
108 int req_addr;
109 int req_count;
110 int req_peer;
111 int req_tag;
112 int req_comm;
113 int req_datatype;
114 int req_proc;
115 int req_sequence;
116 int req_type;
117 int req_pml_complete;
118 } offset;
119 } mca_pml_base_request_t;
120 struct {
121 mqs_type *type;
122 int size;
123 struct {
124 int req_addr;
125 int req_bytes_packed;
126 int req_send_mode;
127 } offset;
128 } mca_pml_base_send_request_t;
129 struct {
130 mqs_type *type;
131 int size;
132 struct {
133 int req_bytes_packed;
134 } offset;
135 } mca_pml_base_recv_request_t;
136 #if 0
137 /* fragments for unexpected messages (as well as theirs headers) */
138 struct {
139 mqs_type *type;
140 int size;
141 struct {
142 int hdr;
143 int request;
144 } offset;
145 } mca_pml_ob1_recv_frag_t;
146 struct {
147 mqs_type *type;
148 int size;
149 struct {
150 int hdr_type;
151 int hdr_flags;
152 } offset;
153 } mca_pml_ob1_common_hdr_t;
154 struct {
155 mqs_type *type;
156 int size;
157 struct {
158 int hdr_common;
159 int hdr_ctx;
160 int hdr_src;
161 int hdr_tag;
162 int hdr_seq;
163 } offset;
164 } mca_pml_ob1_match_hdr_t;
165 #endif
166 /* opal_pointer_array structure */
167 struct {
168 mqs_type *type;
169 int size;
170 struct {
171 int lowest_free;
172 int number_free;
173 int size;
174 int addr;
175 } offset;
176 } opal_pointer_array_t;
177 /* group structure */
178 struct {
179 mqs_type *type;
180 int size;
181 struct {
182 int grp_proc_count;
183 int grp_proc_pointers;
184 int grp_my_rank;
185 int grp_flags;
186 } offset;
187 } ompi_group_t;
188 /* communicator structure */
189 struct {
190 mqs_type *type;
191 int size;
192 struct {
193 int c_name;
194 int c_contextid;
195 int c_my_rank;
196 int c_local_group;
197 int c_remote_group;
198 int c_flags;
199 int c_f_to_c_index;
200 int c_topo_comm;
201 int c_keyhash;
202 } offset;
203 } ompi_communicator_t;
204 /* base topology information in a communicator */
205 struct {
206 mqs_type *type;
207 int size;
208 struct {
209 int mtc_ndims_or_nnodes;
210 int mtc_dims_or_index;
211 int mtc_periods_or_edges;
212 int mtc_reorder;
213 } offset;
214 } ompi_mca_topo_base_comm_1_0_0_t;
215 /* MPI_Status */
216 struct {
217 mqs_type *type;
218 int size;
219 struct {
220 int MPI_SOURCE;
221 int MPI_TAG;
222 int MPI_ERROR;
223 int _cancelled;
224 int _ucount; /* size_t */
225 } offset;
226 } ompi_status_public_t;
227 /* datatype structure */
228 struct {
229 mqs_type *type;
230 int size;
231 struct {
232 int size;
233 int name;
234 } offset;
235 } ompi_datatype_t;
236
237 /* For the caller to hang their own stuff */
238 void *extra;
239 } mpi_image_info;
240
241 /***********************************************************************/
242 /* Information for a single process. Common across all DLLs.
243 */
244 typedef struct
245 {
246 const struct mqs_process_callbacks * process_callbacks; /* Functions needed here */
247
248 mqs_target_type_sizes sizes; /* Process architecture information */
249
250 /* For the caller to hang their own stuff */
251 void *extra;
252 } mpi_process_info;
253
254 /**********************************************************************/
255 /* Macros to make it transparent that we're calling the TV functions
256 * through function pointers.
257 */
258 #define mqs_malloc (mqs_basic_entrypoints->mqs_malloc_fp)
259 #define mqs_free (mqs_basic_entrypoints->mqs_free_fp)
260 #define mqs_prints (mqs_basic_entrypoints->mqs_dprints_fp)
261 #define mqs_put_image_info (mqs_basic_entrypoints->mqs_put_image_info_fp)
262 #define mqs_get_image_info (mqs_basic_entrypoints->mqs_get_image_info_fp)
263 #define mqs_put_process_info (mqs_basic_entrypoints->mqs_put_process_info_fp)
264 #define mqs_get_process_info (mqs_basic_entrypoints->mqs_get_process_info_fp)
265
266 /* These macros *RELY* on the function already having set up the conventional
267 * local variables i_info or p_info.
268 */
269 #define mqs_find_type (i_info->image_callbacks->mqs_find_type_fp)
270 #define mqs_field_offset (i_info->image_callbacks->mqs_field_offset_fp)
271 #define mqs_sizeof (i_info->image_callbacks->mqs_sizeof_fp)
272 #define mqs_get_type_sizes (i_info->image_callbacks->mqs_get_type_sizes_fp)
273 #define mqs_find_function (i_info->image_callbacks->mqs_find_function_fp)
274 #define mqs_find_symbol (i_info->image_callbacks->mqs_find_symbol_fp)
275
276 #define mqs_get_image (p_info->process_callbacks->mqs_get_image_fp)
277 #define mqs_get_global_rank (p_info->process_callbacks->mqs_get_global_rank_fp)
278 #define mqs_fetch_data (p_info->process_callbacks->mqs_fetch_data_fp)
279 #define mqs_target_to_host (p_info->process_callbacks->mqs_target_to_host_fp)
280
281 /* Basic callbacks into the debugger */
282 extern const mqs_basic_callbacks *mqs_basic_entrypoints;
283
284 /* OMPI-specific functions */
285 int ompi_fill_in_type_info(mqs_image *image, char **message);
286
287 /* Fetch a pointer from the process */
288 mqs_taddr_t ompi_fetch_pointer(mqs_process *proc, mqs_taddr_t addr,
289 mpi_process_info *p_info);
290
291 /* Fetch an int from the process */
292 mqs_tword_t ompi_fetch_int(mqs_process *proc, mqs_taddr_t addr,
293 mpi_process_info *p_info);
294
295 /* Fetch a bool from the process */
296 mqs_tword_t ompi_fetch_bool(mqs_process *proc, mqs_taddr_t addr,
297 mpi_process_info *p_info);
298
299 /* Fetch a size_t from the process */
300 mqs_taddr_t ompi_fetch_size_t(mqs_process *proc, mqs_taddr_t addr,
301 mpi_process_info *p_info);
302
303 /* Helpers to fetch stuff from an opal_pointer_array_t */
304 int ompi_fetch_opal_pointer_array_info(mqs_process *proc, mqs_taddr_t addr,
305 mpi_process_info *p_info,
306 int *size, int *lowest_free,
307 int *number_free);
308 int ompi_fetch_opal_pointer_array_item(mqs_process *proc, mqs_taddr_t addr,
309 mpi_process_info *p_info, int index,
310 mqs_taddr_t *item);
311 #endif
mqs_process_callbacks
Definition: msgq_interface.h:516
opal_hash_table_t
Definition: opal_hash_table.h:42
ompi_datatype_t
Definition: ompi_datatype.h:68
mca_pml_ob1_common_hdr_t
Common hdr attributes - must be first element in each hdr type.
Definition: pml_ob1_hdr.h:57
opal_list_t
struct opal_list_t opal_list_t
List container type.
Definition: opal_list.h:159
opal_list_item_t
struct opal_list_item_t opal_list_item_t
Base type for items that are put in a list (opal_list_t) containers.
Definition: opal_list.h:118
ompi_request_t
struct ompi_request_t ompi_request_t
Convenience typedef.
Definition: request.h:125
mca_pml_ob1_match_hdr_t
Header definition for the first fragment, contains the attributes required to match the corresponding...
Definition: pml_ob1_hdr.h:70
mca_pml_ob1_recv_frag_t
Definition: pml_ob1_recvfrag.h:39
mqs_image_callbacks
Definition: msgq_interface.h:506
mqs_basic_callbacks
Definition: msgq_interface.h:484
mqs_target_type_sizes
Definition: msgq_interface.h:203
ompi_free_list_t
Definition: ompi_free_list.h:39
mca_pml_base_send_request_t
Base type for send requests.
Definition: pml_base_sendreq.h:37
ompi_group_t
Group structure Currently we have four formats for storing the process pointers that are members of t...
Definition: group.h:79
ompi_free_list_item_t
Definition: ompi_free_list.h:62
mca_pml_base_recv_request_t
Base type for receive requests.
Definition: pml_base_recvreq.h:36
mpi_process_info
Definition: ompi_common_dll_defs.h:244
ompi_status_public_t
Definition: mpi.h:337
request
Definition: evdns.c:158
ompi_communicator_t
Definition: communicator.h:118
mca_pml_base_request_t
Type of request.
Definition: pml_base_request.h:57
opal_pointer_array_t
struct opal_pointer_array_t opal_pointer_array_t
Convenience typedef.
Definition: opal_pointer_array.h:69
mpi_image_info
Definition: ompi_common_dll_defs.h:44