OpenMPI 0.1.1

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

- File List
- Globals

crcp.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * $COPYRIGHT$
13 *
14 * Additional copyrights may follow
15 *
16 * $HEADER$
17 */
18 /**
19 * @file
20 *
21 * Checkpoint/Restart Coordination Protocol (CRCP) Interface
22 *
23 */
24
25 #ifndef MCA_CRCP_H
26 #define MCA_CRCP_H
27
28 #include "ompi_config.h"
29
30 #include "opal/mca/mca.h"
31 #include "opal/mca/base/base.h"
32 #include "opal/mca/crs/crs.h"
33 #include "opal/mca/crs/base/base.h"
34
35 #include "opal/class/opal_object.h"
36
37 #include "ompi/datatype/ompi_datatype.h"
38 #include "ompi/request/request.h"
39
40 #include "ompi/class/ompi_free_list.h"
41
42 #include "ompi/mca/pml/pml.h"
43 #include "ompi/mca/pml/base/base.h"
44
45 #include "ompi/mca/btl/btl.h"
46 #include "ompi/mca/btl/base/base.h"
47
48 BEGIN_C_DECLS
49
50 /**
51 * Module initialization function.
52 * Returns OMPI_SUCCESS
53 */
54 typedef int (*ompi_crcp_base_module_init_fn_t)
55 (void);
56
57 /**
58 * Module finalization function.
59 * Returns OMPI_SUCCESS
60 */
61 typedef int (*ompi_crcp_base_module_finalize_fn_t)
62 (void);
63
64
65 /************************
66 * MPI Quiesce Interface
67 ************************/
68 /**
69 * MPI_Quiesce_start component interface
70 */
71 typedef int (*ompi_crcp_base_quiesce_start_fn_t)
72 (MPI_Info *info);
73
74 /**
75 * MPI_Quiesce_end component interface
76 */
77 typedef int (*ompi_crcp_base_quiesce_end_fn_t)
78 (MPI_Info *info);
79
80
81 /************************
82 * PML Wrapper hooks
83 * PML Wrapper is the CRCPW PML component
84 ************************/
85 /**
86 * To allow us to work before and after a PML command
87 */
88 enum ompi_crcp_base_pml_states_t {
89 OMPI_CRCP_PML_PRE,
90 OMPI_CRCP_PML_POST,
91 OMPI_CRCP_PML_SKIP,
92 OMPI_CRCP_PML_DONE
93 };
94 typedef enum ompi_crcp_base_pml_states_t ompi_crcp_base_pml_states_t;
95
96 struct ompi_crcp_base_pml_state_t {
97 ompi_free_list_item_t super;
98 ompi_crcp_base_pml_states_t state;
99 int error_code;
100 mca_pml_base_component_t *wrapped_pml_component;
101 mca_pml_base_module_t *wrapped_pml_module;
102 };
103 typedef struct ompi_crcp_base_pml_state_t ompi_crcp_base_pml_state_t;
104 OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_crcp_base_pml_state_t);
105
106 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_enable_fn_t)
107 (bool enable, ompi_crcp_base_pml_state_t* );
108
109 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_add_comm_fn_t)
110 ( struct ompi_communicator_t* comm , ompi_crcp_base_pml_state_t*);
111 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_del_comm_fn_t)
112 ( struct ompi_communicator_t* comm , ompi_crcp_base_pml_state_t*);
113
114 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_add_procs_fn_t)
115 ( struct ompi_proc_t **procs, size_t nprocs , ompi_crcp_base_pml_state_t*);
116 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_del_procs_fn_t)
117 ( struct ompi_proc_t **procs, size_t nprocs , ompi_crcp_base_pml_state_t*);
118
119 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_progress_fn_t)
120 (ompi_crcp_base_pml_state_t*);
121
122 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_iprobe_fn_t)
123 (int dst, int tag, struct ompi_communicator_t* comm, int *matched,
124 ompi_status_public_t* status, ompi_crcp_base_pml_state_t* );
125
126 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_probe_fn_t)
127 ( int dst, int tag, struct ompi_communicator_t* comm,
128 ompi_status_public_t* status, ompi_crcp_base_pml_state_t* );
129
130 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_isend_init_fn_t)
131 ( void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag,
132 mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm,
133 struct ompi_request_t **request, ompi_crcp_base_pml_state_t* );
134
135 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_isend_fn_t)
136 ( void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag,
137 mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm,
138 struct ompi_request_t **request, ompi_crcp_base_pml_state_t* );
139
140 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_send_fn_t)
141 ( void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag,
142 mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm,
143 ompi_crcp_base_pml_state_t* );
144
145 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_irecv_init_fn_t)
146 ( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag,
147 struct ompi_communicator_t* comm, struct ompi_request_t **request,
148 ompi_crcp_base_pml_state_t*);
149
150 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_irecv_fn_t)
151 ( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag,
152 struct ompi_communicator_t* comm, struct ompi_request_t **request,
153 ompi_crcp_base_pml_state_t* );
154
155 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_recv_fn_t)
156 ( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag,
157 struct ompi_communicator_t* comm, ompi_status_public_t* status,
158 ompi_crcp_base_pml_state_t*);
159
160 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_dump_fn_t)
161 ( struct ompi_communicator_t* comm, int verbose, ompi_crcp_base_pml_state_t* );
162
163 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_start_fn_t)
164 ( size_t count, ompi_request_t** requests, ompi_crcp_base_pml_state_t* );
165
166 typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_ft_event_fn_t)
167 (int state, ompi_crcp_base_pml_state_t*);
168
169 /* Request Interface */
170 typedef int (*ompi_crcp_base_request_complete_fn_t)
171 (struct ompi_request_t *request);
172
173 /************************
174 * BTL Wrapper hooks
175 * JJH: Wrapper BTL not currently implemented.
176 ************************/
177 /**
178 * To allow us to work before and after a BTL command
179 */
180 enum ompi_crcp_base_btl_states_t {
181 OMPI_CRCP_BTL_PRE,
182 OMPI_CRCP_BTL_POST,
183 OMPI_CRCP_BTL_SKIP,
184 OMPI_CRCP_BTL_DONE
185 };
186 typedef enum ompi_crcp_base_btl_states_t ompi_crcp_base_btl_states_t;
187
188 struct ompi_crcp_base_btl_state_t {
189 ompi_free_list_item_t super;
190 ompi_crcp_base_btl_states_t state;
191 int error_code;
192 mca_btl_base_descriptor_t* des;
193 mca_btl_base_component_t *wrapped_btl_component;
194 mca_btl_base_module_t *wrapped_btl_module;
195 };
196 typedef struct ompi_crcp_base_btl_state_t ompi_crcp_base_btl_state_t;
197 OBJ_CLASS_DECLARATION(ompi_crcp_base_btl_state_t);
198
199 typedef ompi_crcp_base_btl_state_t* (*mca_crcp_base_btl_module_add_procs_fn_t)
200 ( struct mca_btl_base_module_t* btl,
201 size_t nprocs,
202 struct ompi_proc_t** procs,
203 struct mca_btl_base_endpoint_t** endpoints,
204 struct opal_bitmap_t* reachable,
205 ompi_crcp_base_btl_state_t* );
206
207 typedef ompi_crcp_base_btl_state_t* (*mca_crcp_base_btl_module_del_procs_fn_t)
208 ( struct mca_btl_base_module_t* btl,
209 size_t nprocs,
210 struct ompi_proc_t** procs,
211 struct mca_btl_base_endpoint_t**,
212 ompi_crcp_base_btl_state_t*);
213
214 typedef ompi_crcp_base_btl_state_t* (*mca_crcp_base_btl_module_register_fn_t)
215 ( struct mca_btl_base_module_t* btl,
216 mca_btl_base_tag_t tag,
217 mca_btl_base_module_recv_cb_fn_t cbfunc,
218 void* cbdata,
219 ompi_crcp_base_btl_state_t*);
220
221 typedef ompi_crcp_base_btl_state_t* (*mca_crcp_base_btl_module_finalize_fn_t)
222 ( struct mca_btl_base_module_t* btl,
223 ompi_crcp_base_btl_state_t*);
224
225 typedef ompi_crcp_base_btl_state_t* (*mca_crcp_base_btl_module_alloc_fn_t)
226 ( struct mca_btl_base_module_t* btl,
227 size_t size,
228 ompi_crcp_base_btl_state_t*);
229
230 typedef ompi_crcp_base_btl_state_t* (*mca_crcp_base_btl_module_free_fn_t)
231 ( struct mca_btl_base_module_t* btl,
232 mca_btl_base_descriptor_t* descriptor,
233 ompi_crcp_base_btl_state_t*);
234
235 typedef ompi_crcp_base_btl_state_t* (*mca_crcp_base_btl_module_prepare_fn_t)
236 ( struct mca_btl_base_module_t* btl,
237 struct mca_btl_base_endpoint_t* endpoint,
238 mca_mpool_base_registration_t* registration,
239 struct opal_convertor_t* convertor,
240 size_t reserve,
241 size_t* size,
242 ompi_crcp_base_btl_state_t*);
243
244 typedef ompi_crcp_base_btl_state_t* (*mca_crcp_base_btl_module_send_fn_t)
245 ( struct mca_btl_base_module_t* btl,
246 struct mca_btl_base_endpoint_t* endpoint,
247 struct mca_btl_base_descriptor_t* descriptor,
248 mca_btl_base_tag_t tag,
249 ompi_crcp_base_btl_state_t*);
250
251 typedef ompi_crcp_base_btl_state_t* (*mca_crcp_base_btl_module_put_fn_t)
252 ( struct mca_btl_base_module_t* btl,
253 struct mca_btl_base_endpoint_t* endpoint,
254 struct mca_btl_base_descriptor_t* descriptor,
255 ompi_crcp_base_btl_state_t*);
256
257 typedef ompi_crcp_base_btl_state_t* (*mca_crcp_base_btl_module_get_fn_t)
258 ( struct mca_btl_base_module_t* btl,
259 struct mca_btl_base_endpoint_t* endpoint,
260 struct mca_btl_base_descriptor_t* descriptor,
261 ompi_crcp_base_btl_state_t*);
262
263 typedef ompi_crcp_base_btl_state_t* (*mca_crcp_base_btl_module_dump_fn_t)
264 ( struct mca_btl_base_module_t* btl,
265 struct mca_btl_base_endpoint_t* endpoint,
266 int verbose,
267 ompi_crcp_base_btl_state_t*);
268
269 typedef ompi_crcp_base_btl_state_t* (*mca_crcp_base_btl_module_ft_event_fn_t)
270 (int state,
271 ompi_crcp_base_btl_state_t*);
272
273
274 /**
275 * Structure for CRCP components.
276 */
277 struct ompi_crcp_base_component_2_0_0_t {
278 /** MCA base component */
279 mca_base_component_t base_version;
280 /** MCA base data */
281 mca_base_component_data_t base_data;
282
283 /** Verbosity Level */
284 int verbose;
285 /** Output Handle for opal_output */
286 int output_handle;
287 /** Default Priority */
288 int priority;
289
290 };
291 typedef struct ompi_crcp_base_component_2_0_0_t ompi_crcp_base_component_2_0_0_t;
292 typedef struct ompi_crcp_base_component_2_0_0_t ompi_crcp_base_component_t;
293
294 /**
295 * Structure for CRCP modules
296 */
297 struct ompi_crcp_base_module_1_0_0_t {
298 /** Initialization Function */
299 ompi_crcp_base_module_init_fn_t crcp_init;
300 /** Finalization Function */
301 ompi_crcp_base_module_finalize_fn_t crcp_finalize;
302
303 /**< MPI_Quiesce Interface Functions ******************/
304 ompi_crcp_base_quiesce_start_fn_t quiesce_start;
305 ompi_crcp_base_quiesce_end_fn_t quiesce_end;
306
307 /**< PML Wrapper Functions ****************************/
308 ompi_crcp_base_pml_enable_fn_t pml_enable;
309
310 ompi_crcp_base_pml_add_comm_fn_t pml_add_comm;
311 ompi_crcp_base_pml_del_comm_fn_t pml_del_comm;
312
313 ompi_crcp_base_pml_add_procs_fn_t pml_add_procs;
314 ompi_crcp_base_pml_del_procs_fn_t pml_del_procs;
315
316 ompi_crcp_base_pml_progress_fn_t pml_progress;
317
318 ompi_crcp_base_pml_iprobe_fn_t pml_iprobe;
319 ompi_crcp_base_pml_probe_fn_t pml_probe;
320
321 ompi_crcp_base_pml_isend_init_fn_t pml_isend_init;
322 ompi_crcp_base_pml_isend_fn_t pml_isend;
323 ompi_crcp_base_pml_send_fn_t pml_send;
324
325 ompi_crcp_base_pml_irecv_init_fn_t pml_irecv_init;
326 ompi_crcp_base_pml_irecv_fn_t pml_irecv;
327 ompi_crcp_base_pml_recv_fn_t pml_recv;
328
329 ompi_crcp_base_pml_dump_fn_t pml_dump;
330 ompi_crcp_base_pml_start_fn_t pml_start;
331
332 ompi_crcp_base_pml_ft_event_fn_t pml_ft_event;
333
334 /**< Request complete Function ****************************/
335 ompi_crcp_base_request_complete_fn_t request_complete;
336
337 /**< BTL Wrapper Functions ****************************/
338 mca_crcp_base_btl_module_add_procs_fn_t btl_add_procs;
339 mca_crcp_base_btl_module_del_procs_fn_t btl_del_procs;
340
341 mca_crcp_base_btl_module_register_fn_t btl_register;
342 mca_crcp_base_btl_module_finalize_fn_t btl_finalize;
343
344 mca_crcp_base_btl_module_alloc_fn_t btl_alloc;
345 mca_crcp_base_btl_module_free_fn_t btl_free;
346
347 mca_crcp_base_btl_module_prepare_fn_t btl_prepare_src;
348 mca_crcp_base_btl_module_prepare_fn_t btl_prepare_dst;
349
350 mca_crcp_base_btl_module_send_fn_t btl_send;
351 mca_crcp_base_btl_module_put_fn_t btl_put;
352 mca_crcp_base_btl_module_get_fn_t btl_get;
353
354 mca_crcp_base_btl_module_dump_fn_t btl_dump;
355
356 mca_crcp_base_btl_module_ft_event_fn_t btl_ft_event;
357 };
358 typedef struct ompi_crcp_base_module_1_0_0_t ompi_crcp_base_module_1_0_0_t;
359 typedef struct ompi_crcp_base_module_1_0_0_t ompi_crcp_base_module_t;
360
361 OMPI_DECLSPEC extern ompi_crcp_base_module_t ompi_crcp;
362
363 /**
364 * Macro for use in components that are of type CRCP
365 */
366 #define OMPI_CRCP_BASE_VERSION_2_0_0 \
367 MCA_BASE_VERSION_2_0_0, \
368 "crcp", 2, 0, 0
369
370 /**
371 * Macro to call the CRCP Request Complete function
372 */
373 #if OPAL_ENABLE_FT_CR == 1
374 #define OMPI_CRCP_REQUEST_COMPLETE(req) \
375 if( NULL != ompi_crcp.request_complete) { \
376 ompi_crcp.request_complete(req); \
377 }
378 #else
379 #define OMPI_CRCP_REQUEST_COMPLETE(req) ;
380 #endif
381
382 END_C_DECLS
383
384 #endif /* OMPI_CRCP_H */
ompi_crcp_base_component_2_0_0_t::output_handle
int output_handle
Output Handle for opal_output.
Definition: crcp.h:286
mca_base_component_2_0_0_t
Common type for all MCA components.
Definition: mca.h:250
mca_btl_base_descriptor_t
A descriptor that holds the parameters to a send/put/get operation along w/ a callback routine that i...
Definition: btl.h:275
ompi_crcp_base_module_1_0_0_t::quiesce_end
ompi_crcp_base_quiesce_end_fn_t quiesce_end
PML Wrapper Functions.
Definition: crcp.h:305
ompi_crcp_base_pml_state_t
Definition: crcp.h:96
pml.h
P2P Management Layer (PML)
mca_btl_base_module_recv_cb_fn_t
void(* mca_btl_base_module_recv_cb_fn_t)(struct mca_btl_base_module_t *btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t *descriptor, void *cbdata)
Callback function that is called asynchronously on receipt of data by the transport layer...
Definition: btl.h:391
opal_bitmap_t
Definition: opal_bitmap.h:53
ompi_crcp_base_component_2_0_0_t::priority
int priority
Default Priority.
Definition: crcp.h:288
ompi_datatype_t
Definition: ompi_datatype.h:68
ompi_crcp_base_quiesce_start_fn_t
int(* ompi_crcp_base_quiesce_start_fn_t)(MPI_Info *info)
MPI_Quiesce_start component interface.
Definition: crcp.h:72
ompi_crcp_base_module_finalize_fn_t
int(* ompi_crcp_base_module_finalize_fn_t)(void)
Module finalization function.
Definition: crcp.h:62
ompi_crcp_base_module_1_0_0_t::request_complete
ompi_crcp_base_request_complete_fn_t request_complete
BTL Wrapper Functions.
Definition: crcp.h:335
ompi_crcp_base_module_1_0_0_t::crcp_finalize
ompi_crcp_base_module_finalize_fn_t crcp_finalize
Finalization Function.
Definition: crcp.h:301
ompi_crcp_base_module_1_0_0_t::crcp_init
ompi_crcp_base_module_init_fn_t crcp_init
Initialization Function.
Definition: crcp.h:299
ompi_crcp_base_btl_state_t
Definition: crcp.h:188
mca_pml_base_component_2_0_0_t
PML component version and interface functions.
Definition: pml.h:131
ompi_crcp_base_component_2_0_0_t::base_version
mca_base_component_t base_version
MCA base component.
Definition: crcp.h:279
mca_mpool_base_registration_t
Definition: mpool.h:44
ompi_proc_t
Remote Open MPI process structure.
Definition: proc.h:56
ompi_crcp_base_component_2_0_0_t::verbose
int verbose
Verbosity Level.
Definition: crcp.h:284
ompi_crcp_base_quiesce_end_fn_t
int(* ompi_crcp_base_quiesce_end_fn_t)(MPI_Info *info)
MPI_Quiesce_end component interface.
Definition: crcp.h:78
mca.h
Top-level interface for all MCA components.
ompi_info_t
Definition: info.h:38
ompi_crcp_base_module_1_0_0_t
Structure for CRCP modules.
Definition: crcp.h:297
request.h
Top-level description of requests.
btl.h
Byte Transfer Layer (BTL)
mca_pml_base_module_1_0_0_t
PML instance.
Definition: pml.h:512
ompi_crcp_base_component_2_0_0_t::base_data
mca_base_component_data_t base_data
MCA base data.
Definition: crcp.h:281
mca_btl_base_endpoint_t
State of ELAN endpoint connection.
Definition: btl_elan_endpoint.h:33
ompi_free_list_item_t
Definition: ompi_free_list.h:62
mca_btl_base_component_2_0_0_t
BTL component descriptor.
Definition: btl.h:411
opal_convertor_t
Definition: opal_convertor.h:90
ompi_crcp_base_component_2_0_0_t
Structure for CRCP components.
Definition: crcp.h:277
mca_base_component_data_2_0_0_t
Meta data for MCA v2.0.0 components.
Definition: mca.h:309
ompi_crcp_base_module_1_0_0_t::pml_ft_event
ompi_crcp_base_pml_ft_event_fn_t pml_ft_event
Request complete Function.
Definition: crcp.h:332
base.h
ompi_status_public_t
Definition: mpi.h:337
request
Definition: evdns.c:158
crs.h
Checkpoint and Restart Service (CRS) Interface.
mca_btl_base_module_t
BTL module interface functions and attributes.
Definition: btl.h:786
ompi_crcp_base_btl_states_t
ompi_crcp_base_btl_states_t
To allow us to work before and after a BTL command.
Definition: crcp.h:180
ompi_crcp_base_module_init_fn_t
BEGIN_C_DECLS typedef int(* ompi_crcp_base_module_init_fn_t)(void)
Module initialization function.
Definition: crcp.h:55
opal_object.h
A simple C-language object-oriented system with single inheritance and ownership-based memory managem...
ompi_communicator_t
Definition: communicator.h:118
ompi_crcp_base_pml_states_t
ompi_crcp_base_pml_states_t
To allow us to work before and after a PML command.
Definition: crcp.h:88
ompi_request_t
Main top-level request struct definition.
Definition: request.h:100
OBJ_CLASS_DECLARATION
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236