25 #ifndef MCA_IOF_BASE_H
26 #define MCA_IOF_BASE_H
28 #include "orte_config.h"
29 #ifdef HAVE_SYS_TYPES_H
30 #include <sys/types.h>
54 #if !ORTE_DISABLE_FULL_SUPPORT
59 #define ORTE_IOF_BASE_MSG_MAX 4096
60 #define ORTE_IOF_BASE_TAG_MAX 50
61 #define ORTE_IOF_BASE_TAGGED_OUT_MAX 8192
62 #define ORTE_IOF_MAX_INPUT_BUFFERS 50
111 char data[ORTE_IOF_BASE_TAGGED_OUT_MAX];
127 #if OPAL_ENABLE_DEBUG
129 #define ORTE_IOF_SINK_DEFINE(snk, nm, fid, tg, wrthndlr, eplist) \
131 orte_iof_sink_t *ep; \
132 OPAL_OUTPUT_VERBOSE((1, orte_iof_base.iof_output, \
133 "defining endpt: file %s line %d fd %d",\
134 __FILE__, __LINE__, (fid))); \
135 ep = OBJ_NEW(orte_iof_sink_t); \
136 ep->name.jobid = (nm)->jobid; \
137 ep->name.vpid = (nm)->vpid; \
138 ORTE_EPOCH_SET(ep->name.epoch,(nm)->epoch); \
141 ep->wev->fd = (fid); \
142 opal_event_set(opal_event_base, \
143 &(ep->wev->ev), ep->wev->fd, \
147 if (NULL != (eplist)) { \
148 opal_list_append((eplist), &ep->super); \
151 ep->file = strdup(__FILE__); \
152 ep->line = __LINE__; \
161 #define ORTE_IOF_READ_EVENT(rv, nm, fid, tg, cbfunc, actv) \
163 orte_iof_read_event_t *rev; \
164 OPAL_OUTPUT_VERBOSE((1, orte_iof_base.iof_output, \
165 "%s defining read event for %s: %s %d", \
166 ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), \
167 ORTE_NAME_PRINT((nm)), \
168 __FILE__, __LINE__)); \
169 rev = OBJ_NEW(orte_iof_read_event_t); \
170 rev->name.jobid = (nm)->jobid; \
171 rev->name.vpid = (nm)->vpid; \
172 ORTE_EPOCH_SET(rev->name.epoch,(nm)->epoch); \
176 rev->file = strdup(__FILE__); \
177 rev->line = __LINE__; \
178 opal_event_set(opal_event_base, \
183 rev->active = true; \
184 opal_event_add(&rev->ev, 0); \
191 #define ORTE_IOF_SINK_DEFINE(snk, nm, fid, tg, wrthndlr, eplist) \
193 orte_iof_sink_t *ep; \
194 ep = OBJ_NEW(orte_iof_sink_t); \
195 ep->name.jobid = (nm)->jobid; \
196 ep->name.vpid = (nm)->vpid; \
197 ORTE_EPOCH_SET(ep->name.epoch,(nm)->epoch); \
200 ep->wev->fd = (fid); \
201 opal_event_set(opal_event_base, \
202 &(ep->wev->ev), ep->wev->fd, \
206 if (NULL != (eplist)) { \
207 opal_list_append((eplist), &ep->super); \
212 #define ORTE_IOF_READ_EVENT(rv, nm, fid, tg, cbfunc, actv) \
214 orte_iof_read_event_t *rev; \
215 rev = OBJ_NEW(orte_iof_read_event_t); \
216 rev->name.jobid = (nm)->jobid; \
217 rev->name.vpid = (nm)->vpid; \
218 ORTE_EPOCH_SET(rev->name.epoch,(nm)->epoch); \
222 opal_event_set(opal_event_base, \
227 rev->active = true; \
228 opal_event_add(&rev->ev, 0); \
234 ORTE_DECLSPEC
int orte_iof_base_close(
void);
236 ORTE_DECLSPEC
int orte_iof_base_flush(
void);
241 ORTE_DECLSPEC
int orte_iof_base_write_output(
orte_process_name_t *name, orte_iof_tag_t stream,
242 unsigned char *data,
int numbytes,
244 ORTE_DECLSPEC
void orte_iof_base_write_handler(
int fd,
short event,
void *cbdata);
BEGIN_C_DECLS ORTE_DECLSPEC int orte_iof_base_open(void)
Function for finding and opening either all MCA components, or the one that was specifically requeste...
Definition: iof_base_open.c:183
Structure to represent a single event.
Definition: event_struct.h:87
Definition: mutex_unix.h:53
I/O Forwarding Service The I/O forwarding service (IOF) is used to connect stdin, stdout...
Top-level interface for all MCA components.
Definition: opal_list.h:98
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(mca_oob_base_info_t)
declare the association structure as a class
Base object.
Definition: opal_object.h:182
Definition: opal_list.h:147
Global params for OpenRTE.
ORTE_DECLSPEC int orte_iof_base_select(void)
Call the query function on all available components to find out if they want to run.
Definition: iof_base_select.c:36