OpenMPI 0.1.1

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

- File List
- Globals

sstore_stage.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 * STAGE SSTORE component
15 *
16 */
17
18 #ifndef MCA_SSTORE_STAGE_EXPORT_H
19 #define MCA_SSTORE_STAGE_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_stage_cmd_flag_t;
30 #define ORTE_SSTORE_STAGE_CMD OPAL_UINT8
31 #define ORTE_SSTORE_STAGE_PULL 1
32 #define ORTE_SSTORE_STAGE_PUSH 2
33 #define ORTE_SSTORE_STAGE_REMOVE 3
34 #define ORTE_SSTORE_STAGE_DONE 4
35
36 #define ORTE_SSTORE_LOCAL_SNAPSHOT_DIR_NAME ("openmpi-local-snapshot")
37 #define ORTE_SSTORE_LOCAL_SNAPSHOT_STAGE_DIR_NAME ("stage")
38 #define ORTE_SSTORE_LOCAL_SNAPSHOT_RESTART_DIR_NAME ("restart")
39 #define ORTE_SSTORE_LOCAL_SNAPSHOT_CACHE_DIR_NAME ("cache")
40
41 /*
42 * Local Component structures
43 */
44 struct orte_sstore_stage_component_t {
45 /** Base SSTORE component */
46 orte_sstore_base_component_t super;
47 };
48 typedef struct orte_sstore_stage_component_t orte_sstore_stage_component_t;
49 ORTE_MODULE_DECLSPEC extern orte_sstore_stage_component_t mca_sstore_stage_component;
50
51 extern char * orte_sstore_stage_local_snapshot_dir;
52 extern bool orte_sstore_stage_global_is_shared;
53 extern bool orte_sstore_stage_skip_filem;
54 extern bool orte_sstore_stage_enabled_caching;
55 extern bool orte_sstore_stage_enabled_compression;
56 extern int orte_sstore_stage_compress_delay;
57 extern int orte_sstore_stage_progress_meter;
58
59 int orte_sstore_stage_component_query(mca_base_module_t **module, int *priority);
60
61 /*
62 * Module functions
63 */
64 int orte_sstore_stage_module_init(void);
65 int orte_sstore_stage_module_finalize(void);
66
67 int orte_sstore_stage_request_checkpoint_handle(orte_sstore_base_handle_t *handle, int seq, orte_jobid_t jobid);
68 int orte_sstore_stage_request_restart_handle(orte_sstore_base_handle_t *handle, char *basedir, char *ref, int seq,
69 orte_sstore_base_global_snapshot_info_t *snapshot);
70 int orte_sstore_stage_request_global_snapshot_data(orte_sstore_base_handle_t *handle,
71 orte_sstore_base_global_snapshot_info_t *snapshot);
72 int orte_sstore_stage_register(orte_sstore_base_handle_t handle);
73
74 int orte_sstore_stage_get_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char **value);
75 int orte_sstore_stage_set_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char *value);
76
77 int orte_sstore_stage_sync(orte_sstore_base_handle_t handle);
78 int orte_sstore_stage_remove(orte_sstore_base_handle_t handle);
79
80 int orte_sstore_stage_pack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t handle);
81 int orte_sstore_stage_unpack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t *handle);
82
83 int orte_sstore_stage_fetch_app_deps(orte_app_context_t *app);
84 int orte_sstore_stage_wait_all_deps(void);
85
86 /*
87 * HNP functions
88 */
89 int orte_sstore_stage_global_module_init(void);
90 int orte_sstore_stage_global_module_finalize(void);
91 int orte_sstore_stage_global_request_checkpoint_handle(orte_sstore_base_handle_t *handle, int seq, orte_jobid_t jobid);
92 int orte_sstore_stage_global_request_global_snapshot_data(orte_sstore_base_handle_t *handle,
93 orte_sstore_base_global_snapshot_info_t *snapshot);
94 int orte_sstore_stage_global_register(orte_sstore_base_handle_t handle);
95 int orte_sstore_stage_global_get_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char **value);
96 int orte_sstore_stage_global_set_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char *value);
97 int orte_sstore_stage_global_sync(orte_sstore_base_handle_t handle);
98 int orte_sstore_stage_global_remove(orte_sstore_base_handle_t handle);
99 int orte_sstore_stage_global_pack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t handle);
100 int orte_sstore_stage_global_unpack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t *handle);
101
102 /*
103 * Orted functions
104 */
105 int orte_sstore_stage_local_module_init(void);
106 int orte_sstore_stage_local_module_finalize(void);
107 int orte_sstore_stage_local_request_checkpoint_handle(orte_sstore_base_handle_t *handle, int seq, orte_jobid_t jobid);
108 int orte_sstore_stage_local_register(orte_sstore_base_handle_t handle);
109 int orte_sstore_stage_local_get_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char **value);
110 int orte_sstore_stage_local_set_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char *value);
111 int orte_sstore_stage_local_sync(orte_sstore_base_handle_t handle);
112 int orte_sstore_stage_local_remove(orte_sstore_base_handle_t handle);
113 int orte_sstore_stage_local_pack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t handle);
114 int orte_sstore_stage_local_unpack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t *handle);
115 int orte_sstore_stage_local_fetch_app_deps(orte_app_context_t *app);
116 int orte_sstore_stage_local_wait_all_deps(void);
117
118 void orte_sstore_stage_local_process_cmd(int fd,
119 short event,
120 void *cbdata);
121 int orte_sstore_stage_local_process_cmd_action(orte_process_name_t *sender,
122 orte_sstore_stage_cmd_flag_t command,
123 orte_sstore_base_handle_t loc_id,
124 opal_buffer_t* buffer);
125 /*
126 * Application functions
127 */
128 int orte_sstore_stage_app_module_init(void);
129 int orte_sstore_stage_app_module_finalize(void);
130 int orte_sstore_stage_app_request_checkpoint_handle(orte_sstore_base_handle_t *handle, int seq, orte_jobid_t jobid);
131 int orte_sstore_stage_app_register(orte_sstore_base_handle_t handle);
132 int orte_sstore_stage_app_get_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char **value);
133 int orte_sstore_stage_app_set_attr(orte_sstore_base_handle_t handle, orte_sstore_base_key_t key, char *value);
134 int orte_sstore_stage_app_sync(orte_sstore_base_handle_t handle);
135 int orte_sstore_stage_app_remove(orte_sstore_base_handle_t handle);
136 int orte_sstore_stage_app_pack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t handle);
137 int orte_sstore_stage_app_unpack(orte_process_name_t* peer, opal_buffer_t* buffer, orte_sstore_base_handle_t *handle);
138
139 /*
140 * Internal utility functions
141 */
142
143 END_C_DECLS
144
145 #endif /* MCA_SSTORE_STAGE_EXPORT_H */
orte_app_context_t
Information about a specific application to be launched in the RTE.
Definition: orte_globals.h:196
mca_base_module_2_0_0_t
Common type for all MCA modules.
Definition: mca.h:100
orte_jobid_t
uint32_t orte_jobid_t
Set the allowed range for ids in each space.
Definition: types.h:76
orte_process_name_t
Definition: types.h:146
event
Structure to represent a single event.
Definition: event_struct.h:87
orte_sstore_base_global_snapshot_info_1_0_0_t
Definition: sstore.h:138
sstore.h
Distributed Stable Storage (SStore) Interface.
orte_sstore_base_component_2_0_0_t
Structure for SSTORE components.
Definition: sstore.h:340
mca.h
Top-level interface for all MCA components.
orte_sstore_stage_component_t::super
orte_sstore_base_component_t super
Base SSTORE component.
Definition: sstore_stage.h:46
orte_sstore_base_key_t
BEGIN_C_DECLS typedef uint32_t orte_sstore_base_key_t
Keys accepted as metadata.
Definition: sstore.h:36
opal_buffer_t
Structure for holding a buffer to be used with the RML or OOB subsystems.
Definition: dss_types.h:159
orte_sstore_stage_component_t
Definition: sstore_stage.h:44