OpenMPI  0.1.1
sstore_central.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010 The Trustees of Indiana University.
3  * All rights reserved.
4  * $COPYRIGHT$
5  *
6  * Additional copyrights may follow
7  *
8  * $HEADER$
9  */
10 
11 /**
12  * @file
13  *
14  * CENTRAL SSTORE component
15  *
16  */
17 
18 #ifndef MCA_SSTORE_CENTRAL_EXPORT_H
19 #define MCA_SSTORE_CENTRAL_EXPORT_H
20 
21 #include "orte_config.h"
22 
23 #include "opal/mca/mca.h"
24 
25 #include "orte/mca/sstore/sstore.h"
26 
27 BEGIN_C_DECLS
28 
29 typedef uint8_t orte_sstore_central_cmd_flag_t;
30 #define ORTE_SSTORE_CENTRAL_CMD OPAL_UINT8
31 #define ORTE_SSTORE_CENTRAL_PULL 1
32 #define ORTE_SSTORE_CENTRAL_PUSH 2
33 
34  /*
35  * Local Component structures
36  */
38  /** Base SSTORE component */
40  };
42  ORTE_MODULE_DECLSPEC extern orte_sstore_central_component_t mca_sstore_central_component;
43 
44  int orte_sstore_central_component_query(mca_base_module_t **module, int *priority);
45 
46  /*
47  * Module functions
48  */
49  int orte_sstore_central_module_init(void);
50  int orte_sstore_central_module_finalize(void);
51 
52  int orte_sstore_central_request_checkpoint_handle(orte_sstore_base_handle_t *handle, int seq, orte_jobid_t jobid);
53  int orte_sstore_central_request_restart_handle(orte_sstore_base_handle_t *handle, char *basedir, char *ref, int seq,
55  int orte_sstore_central_request_global_snapshot_data(orte_sstore_base_handle_t *handle,
57  int orte_sstore_central_register(orte_sstore_base_handle_t handle);
58 
59  int orte_sstore_central_get_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char **value);
60  int orte_sstore_central_set_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char *value);
61 
62  int orte_sstore_central_sync(orte_sstore_base_handle_t handle);
63  int orte_sstore_central_remove(orte_sstore_base_handle_t handle);
64 
65  int orte_sstore_central_pack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t handle);
66  int orte_sstore_central_unpack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t *handle);
67 
68  int orte_sstore_central_fetch_app_deps(orte_app_context_t *app);
69  int orte_sstore_central_wait_all_deps(void);
70 
71  /*
72  * HNP functions
73  */
74 int orte_sstore_central_global_module_init(void);
75 int orte_sstore_central_global_module_finalize(void);
76 int orte_sstore_central_global_request_checkpoint_handle(orte_sstore_base_handle_t *handle, int seq, orte_jobid_t jobid);
77 int orte_sstore_central_global_request_global_snapshot_data(orte_sstore_base_handle_t *handle,
79 int orte_sstore_central_global_request_restart_handle(orte_sstore_base_handle_t *handle, char *basedir,
80  char *ref, int seq,
82 int orte_sstore_central_global_register(orte_sstore_base_handle_t handle);
83 int orte_sstore_central_global_get_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char **value);
84 int orte_sstore_central_global_set_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char *value);
85 int orte_sstore_central_global_sync(orte_sstore_base_handle_t handle);
86 int orte_sstore_central_global_remove(orte_sstore_base_handle_t handle);
87 int orte_sstore_central_global_pack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t handle);
88 int orte_sstore_central_global_unpack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t *handle);
89 
90  /*
91  * Orted functions
92  */
93 int orte_sstore_central_local_module_init(void);
94 int orte_sstore_central_local_module_finalize(void);
95 int orte_sstore_central_local_request_checkpoint_handle(orte_sstore_base_handle_t *handle, int seq, orte_jobid_t jobid);
96 int orte_sstore_central_local_register(orte_sstore_base_handle_t handle);
97 int orte_sstore_central_local_get_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char **value);
98 int orte_sstore_central_local_set_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char *value);
99 int orte_sstore_central_local_sync(orte_sstore_base_handle_t handle);
100 int orte_sstore_central_local_remove(orte_sstore_base_handle_t handle);
101 int orte_sstore_central_local_pack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t handle);
102 int orte_sstore_central_local_unpack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t *handle);
103 
104 void orte_sstore_central_local_process_cmd(int fd,
105  short event,
106  void *cbdata);
107  /*
108  * Application functions
109  */
110 int orte_sstore_central_app_module_init(void);
111 int orte_sstore_central_app_module_finalize(void);
112 int orte_sstore_central_app_request_checkpoint_handle(orte_sstore_base_handle_t *handle, int seq, orte_jobid_t jobid);
113 int orte_sstore_central_app_register(orte_sstore_base_handle_t handle);
114 int orte_sstore_central_app_get_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char **value);
115 int orte_sstore_central_app_set_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char *value);
116 int orte_sstore_central_app_sync(orte_sstore_base_handle_t handle);
117 int orte_sstore_central_app_remove(orte_sstore_base_handle_t handle);
118 int orte_sstore_central_app_pack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t handle);
119 int orte_sstore_central_app_unpack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t *handle);
120 
121  /*
122  * Internal utility functions
123  */
124 
125 END_C_DECLS
126 
127 #endif /* MCA_SSTORE_CENTRAL_EXPORT_H */
Information about a specific application to be launched in the RTE.
Definition: orte_globals.h:196
Definition: sstore_central.h:37
Common type for all MCA modules.
Definition: mca.h:100
uint32_t orte_jobid_t
Set the allowed range for ids in each space.
Definition: types.h:76
Definition: types.h:146
Structure to represent a single event.
Definition: event_struct.h:87
orte_sstore_base_component_t super
Base SSTORE component.
Definition: sstore_central.h:39
Distributed Stable Storage (SStore) Interface.
Structure for SSTORE components.
Definition: sstore.h:340
Top-level interface for all MCA components.
BEGIN_C_DECLS typedef uint32_t orte_sstore_base_key_t
Keys accepted as metadata.
Definition: sstore.h:36
Structure for holding a buffer to be used with the RML or OOB subsystems.
Definition: dss_types.h:159