OpenMPI 0.1.1

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

- File List
- Globals

rml_types.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-2011 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 (c) 2007 Los Alamos National Security, LLC. All rights
13 * reserved.
14 * Copyright (c) 2009-2011 Cisco Systems, Inc. All rights reserved.
15 * Copyright (c) 2012 Oak Ridge National Labs. All rights reserved.
16 * $COPYRIGHT$
17 *
18 * Additional copyrights may follow
19 *
20 * $HEADER$
21 */
22 /** @file:
23 *
24 * Contains the typedefs for the use of the rml
25 */
26
27 #ifndef MCA_RML_TYPES_H_
28 #define MCA_RML_TYPES_H_
29
30 #include "orte_config.h"
31 #include "orte/constants.h"
32 #include "orte/types.h"
33
34 #include <limits.h>
35 #ifdef HAVE_SYS_UIO_H
36 /* for struct iovec */
37 #include <sys/uio.h>
38 #endif
39 #ifdef HAVE_NET_UIO_H
40 #include <net/uio.h>
41 #endif
42
43 #include "opal/dss/dss_types.h"
44 #include "opal/class/opal_list.h"
45
46 BEGIN_C_DECLS
47
48
49 /* ******************************************************************** */
50
51 typedef struct {
52 opal_list_item_t super;
53 orte_process_name_t sender;
54 opal_buffer_t *buffer;
55 } orte_msg_packet_t;
56 ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_msg_packet_t);
57
58 #ifndef __WINDOWS__
59 #define ORTE_PROCESS_MESSAGE(rlist, lck, flg, fd, crt, sndr, buf) \
60 do { \
61 orte_msg_packet_t *pkt; \
62 int data=1; \
63 pkt = OBJ_NEW(orte_msg_packet_t); \
64 pkt->sender.jobid = (sndr)->jobid; \
65 pkt->sender.vpid = (sndr)->vpid; \
66 ORTE_EPOCH_SET(pkt->sender.epoch,(sndr)->epoch); \
67 if ((crt)) { \
68 pkt->buffer = OBJ_NEW(opal_buffer_t); \
69 opal_dss.copy_payload(pkt->buffer, *(buf)); \
70 } else { \
71 pkt->buffer = *(buf); \
72 *(buf) = NULL; \
73 } \
74 OPAL_THREAD_LOCK((lck)); \
75 opal_list_append((rlist), &pkt->super); \
76 if (!(flg)) { \
77 write((fd), &data, sizeof(data)); \
78 } \
79 OPAL_THREAD_UNLOCK((lck)); \
80 } while(0);
81 #else
82 #define ORTE_PROCESS_MESSAGE(rlist, lck, flg, fd, crt, sndr, buf) \
83 do { \
84 orte_msg_packet_t *pkt; \
85 int data=1; \
86 pkt = OBJ_NEW(orte_msg_packet_t); \
87 pkt->sender.jobid = (sndr)->jobid; \
88 pkt->sender.vpid = (sndr)->vpid; \
89 ORTE_EPOCH_SET(pkt->sender.epoch,(sndr)->epoch); \
90 if ((crt)) { \
91 pkt->buffer = OBJ_NEW(opal_buffer_t); \
92 opal_dss.copy_payload(pkt->buffer, *(buf)); \
93 } else { \
94 pkt->buffer = *(buf); \
95 *(buf) = NULL; \
96 } \
97 OPAL_THREAD_LOCK((lck)); \
98 opal_list_append((rlist), &pkt->super); \
99 if (!(flg)) { \
100 send((fd), (const char*) &data, sizeof(data), 0); \
101 } \
102 OPAL_THREAD_UNLOCK((lck)); \
103 } while(0);
104 #endif
105
106
107 /**
108 * Constant tag values for well-known services
109 */
110
111 #define ORTE_RML_TAG_T OPAL_UINT32
112
113 #define ORTE_RML_TAG_INVALID 0
114 #define ORTE_RML_TAG_DAEMON 1
115 #define ORTE_RML_TAG_IOF_HNP 2
116 #define ORTE_RML_TAG_IOF_PROXY 3
117 #define ORTE_RML_TAG_XCAST_BARRIER 4
118 #define ORTE_RML_TAG_PLM 5
119 #define ORTE_RML_TAG_PLM_PROXY 6
120 #define ORTE_RML_TAG_ERRMGR 7
121 #define ORTE_RML_TAG_WIREUP 8
122 #define ORTE_RML_TAG_RML_INFO_UPDATE 9
123 #define ORTE_RML_TAG_ORTED_CALLBACK 10
124 #define ORTE_RML_TAG_REPORT_REMOTE_LAUNCH 12
125
126 #define ORTE_RML_TAG_CKPT 13
127
128 #define ORTE_RML_TAG_RML_ROUTE 14
129
130 #define ORTE_RML_TAG_ALLGATHER 15
131 #define ORTE_RML_TAG_ALLGATHER_LIST 16
132 #define ORTE_RML_TAG_BARRIER 17
133
134 #define ORTE_RML_TAG_UPDATE_ROUTE_ACK 19
135 #define ORTE_RML_TAG_SYNC 20
136
137 /* For FileM Base */
138 #define ORTE_RML_TAG_FILEM_BASE 21
139 #define ORTE_RML_TAG_FILEM_BASE_RESP 22
140
141 /* For FileM RSH Component */
142 #define ORTE_RML_TAG_FILEM_RSH 23
143
144 /* For SnapC Framework */
145 #define ORTE_RML_TAG_SNAPC 24
146 #define ORTE_RML_TAG_SNAPC_FULL 25
147
148 /* For tools */
149 #define ORTE_RML_TAG_TOOL 26
150
151 /* support data store/lookup */
152 #define ORTE_RML_TAG_DATA_SERVER 27
153 #define ORTE_RML_TAG_DATA_CLIENT 28
154
155 /* timing related */
156 #define ORTE_RML_TAG_COLLECTIVE_TIMER 29
157
158 /* daemon collectives */
159 #define ORTE_RML_TAG_DAEMON_COLLECTIVE 30
160
161 /* show help */
162 #define ORTE_RML_TAG_SHOW_HELP 31
163
164 /* debugger release */
165 #define ORTE_RML_TAG_DEBUGGER_RELEASE 32
166
167 /* bootstrap */
168 #define ORTE_RML_TAG_BOOTSTRAP 34
169
170 /* TCP "fake" multicast */
171 #define ORTE_RML_TAG_MULTICAST 35
172 /* multicast messages sent direct */
173 #define ORTE_RML_TAG_MULTICAST_DIRECT 36
174 /* report a missed msg */
175 #define ORTE_RML_TAG_MISSED_MSG 37
176
177 /* tag for receiving ack of abort msg */
178 #define ORTE_RML_TAG_ABORT 38
179
180 /* tag for receiving heartbeats */
181 #define ORTE_RML_TAG_HEARTBEAT 39
182
183 /* notifier data */
184 #define ORTE_RML_TAG_NOTIFIER_HNP 40
185
186 /* Process Migration Tool Tag */
187 #define ORTE_RML_TAG_MIGRATE 43
188
189 /* For SStore Framework */
190 #define ORTE_RML_TAG_SSTORE 44
191 #define ORTE_RML_TAG_SSTORE_INTERNAL 45
192
193 #define ORTE_RML_TAG_SUBSCRIBE 46
194
195 #if ORTE_ENABLE_EPOCH
196 /* For Epoch Updates */
197 #define ORTE_RML_TAG_EPOCH_CHANGE 47
198 #endif
199
200 /* Notify of failed processes */
201 #define ORTE_RML_TAG_FAILURE_NOTICE 48
202
203 /* OMPI 'revoke' message */
204 #define ORTE_RML_TAG_REVOKE_NOTICE 49
205
206 /* OMPI 'help' message */
207 #define ORTE_RML_TAG_COLL_AGREE_TERM 50
208
209 #define ORTE_RML_TAG_MAX 100
210
211
212 /**
213 * Message matching tag
214 *
215 * Message matching tag. Unlike MPI, there is no wildcard receive,
216 * all messages must match exactly. Tag values less than
217 * ORTE_RML_TAG_DYNAMIC are reserved and may only be referenced using
218 * a defined constant.
219 */
220 typedef uint32_t orte_rml_tag_t;
221
222
223 /* ******************************************************************** */
224
225
226 /*
227 * RML proxy commands
228 */
229 typedef uint8_t orte_rml_cmd_flag_t;
230 #define ORTE_RML_CMD OPAL_UINT8
231 #define ORTE_RML_UPDATE_CMD 1
232
233
234 /* ******************************************************************** */
235 /* Flags to send/recv */
236
237 /**
238 * Non-persistent request that can be deleted when the request is
239 * completed. This is the default behavior.
240 */
241 #define ORTE_RML_NON_PERSISTENT 0x00000000
242
243 /**
244 * flag to oob_recv to allow caller to peek a portion of the next
245 * available message w/out removing the message from the queue.
246 */
247 #define ORTE_RML_PEEK 0x00000001
248
249 /**
250 * flag to oob_recv to return the actual size of the message even if
251 * the receive buffer is smaller than the number of bytes available
252 */
253 #define ORTE_RML_TRUNC 0x00000002
254
255 /**
256 * flag to oob_recv to request the oob to allocate a buffer of the
257 * appropriate size for the receive and return the allocated buffer
258 * and size in the first element of the iovec array.
259 */
260 #define ORTE_RML_ALLOC 0x00000004
261
262 /**
263 * posted non-blocking recv is persistent
264 */
265 #define ORTE_RML_PERSISTENT 0x00000008
266
267 /**
268 * The request is a non-blocking request that can have its callback
269 * triggered as soon as the request is completed, even if the OOB is
270 * currently in the middle of another non-blocking request callback.
271 */
272 #define ORTE_RML_FLAG_RECURSIVE_CALLBACK 0x00000010
273
274
275 typedef enum {
276 ORTE_RML_PEER_UNREACH,
277 ORTE_RML_PEER_DISCONNECTED
278 } orte_rml_exception_t;
279
280
281 END_C_DECLS
282
283
284 #endif /* RML_TYPES */
orte_process_name_t
Definition: types.h:146
opal_list.h
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
opal_list_item_t
Definition: opal_list.h:98
types.h
orte_msg_packet_t
Definition: rml_types.h:51
dss_types.h
Buffer management types.
orte_rml_tag_t
uint32_t orte_rml_tag_t
Message matching tag.
Definition: rml_types.h:220
opal_buffer_t
Structure for holding a buffer to be used with the RML or OOB subsystems.
Definition: dss_types.h:159
OBJ_CLASS_DECLARATION
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236