OpenMPI  0.1.1
mpiext_cr_c.h
1 /*
2  * Copyright (c) 2004-2010 The Trustees of Indiana University.
3  * All rights reserved.
4  * $COPYRIGHT$
5  *
6  * Additional copyrights may follow
7  *
8  * $HEADER$
9  *
10  */
11 #include "opal/runtime/opal_cr.h"
12 
13 /********************************
14  * C/R Interfaces
15  ********************************/
16 /*
17  * Request a checkpoint
18  */
19 OMPI_DECLSPEC int OMPI_CR_Checkpoint(char **handle, int *seq, MPI_Info *info);
20 
21 /*
22  * Request a restart
23  */
24 OMPI_DECLSPEC int OMPI_CR_Restart(char *handle, int seq, MPI_Info *info);
25 
26 
27 /********************************
28  * Migration Interface
29  ********************************/
30 /*
31  * Request a migration
32  */
33 OMPI_DECLSPEC int OMPI_CR_Migrate(MPI_Comm comm, char *hostname, int rank, MPI_Info *info);
34 
35 
36 /********************************
37  * INC Interfaces
38  ********************************/
39 typedef opal_cr_user_inc_callback_event_t OMPI_CR_INC_callback_event_t;
40 
41 typedef opal_cr_user_inc_callback_state_t OMPI_CR_INC_callback_state_t;
42 
43 typedef int (*OMPI_CR_INC_callback_function)(OMPI_CR_INC_callback_event_t event,
44  OMPI_CR_INC_callback_state_t state);
45 
46 OMPI_DECLSPEC int OMPI_CR_INC_register_callback(OMPI_CR_INC_callback_event_t event,
47  OMPI_CR_INC_callback_function function,
48  OMPI_CR_INC_callback_function *prev_function);
49 
50 
51 /********************************
52  * SELF CRS Application Interfaces
53  ********************************/
54 typedef int (*OMPI_CR_self_checkpoint_fn)(char **restart_cmd);
55 typedef int (*OMPI_CR_self_restart_fn)(void);
56 typedef int (*OMPI_CR_self_continue_fn)(void);
57 
58 OMPI_DECLSPEC int OMPI_CR_self_register_checkpoint_callback(OMPI_CR_self_checkpoint_fn function);
59 OMPI_DECLSPEC int OMPI_CR_self_register_restart_callback(OMPI_CR_self_restart_fn function);
60 OMPI_DECLSPEC int OMPI_CR_self_register_continue_callback(OMPI_CR_self_continue_fn function);
61 
62 
63 /********************************
64  * Quiescence Interfaces
65  ********************************/
66 /*
67  * Start the Quiescent region.
68  * Note: 'comm' required to be MPI_COMM_WORLD
69  */
70 OMPI_DECLSPEC int OMPI_CR_Quiesce_start(MPI_Comm comm, MPI_Info *info);
71 
72 /*
73  * Request a checkpoint during a quiescent region
74  * Note: 'comm' required to be MPI_COMM_WORLD
75  */
76 OMPI_DECLSPEC int OMPI_CR_Quiesce_checkpoint(MPI_Comm comm, char **handle, int *seq, MPI_Info *info);
77 
78 /*
79  * End the Quiescent Region
80  * Note: 'comm' required to be MPI_COMM_WORLD
81  */
82 OMPI_DECLSPEC int OMPI_CR_Quiesce_end(MPI_Comm comm, MPI_Info *info);
Structure to represent a single event.
Definition: event_struct.h:87
Definition: info.h:38
Definition: communicator.h:118
Checkpoint functionality for Open MPI.