OpenMPI  0.1.1
iof_orted.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
3  * University Research and Technology
4  * Corporation. All rights reserved.
5  * Copyright (c) 2004-2006 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 Cisco Systems, Inc. All rights reserved.
13  * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
14  * $COPYRIGHT$
15  *
16  * Additional copyrights may follow
17  *
18  * $HEADER$
19  */
20 /**
21  * @file
22  *
23  * The orted IOF component is used in daemons. It is used
24  * to orted all IOF actions back to the "hnp" IOF component (i.e., the
25  * IOF component that runs in the HNP). The orted IOF component is
26  * loaded in an orted and then tied to the stdin, stdout,
27  * and stderr streams of created child processes via pipes. The orted
28  * IOF component in the orted then acts as the relay between the
29  * stdin/stdout/stderr pipes and the IOF component in the HNP.
30  * This design allows us to manipulate stdin/stdout/stderr from before
31  * main() in the child process.
32  *
33  * Much of the intelligence of this component is actually contained in
34  * iof_base_endpoint.c (reading and writing to local file descriptors,
35  * setting up events based on file descriptors, etc.).
36  *
37  * A non-blocking OOB receive is posted at the initialization of this
38  * component to receive all messages from the HNP (e.g., data
39  * fragments from streams, ACKs to fragments).
40  *
41  * Flow control is employed on a per-stream basis to ensure that
42  * SOURCEs don't overwhelm SINK resources (E.g., send an entire input
43  * file to an orted before the target process has read any of it).
44  *
45  */
46 #ifndef ORTE_IOF_ORTED_H
47 #define ORTE_IOF_ORTED_H
48 
49 #include "orte_config.h"
50 
51 #include "opal/class/opal_list.h"
52 
53 #include "orte/mca/rml/rml_types.h"
54 
55 #include "orte/mca/iof/iof.h"
56 
57 BEGIN_C_DECLS
58 
59 /**
60  * IOF ORTED Component
61  */
64  opal_list_t sinks;
65  opal_list_t procs;
66  opal_mutex_t lock;
67  bool xoff;
68 };
70 
71 ORTE_MODULE_DECLSPEC extern orte_iof_orted_component_t mca_iof_orted_component;
72 extern orte_iof_base_module_t orte_iof_orted_module;
73 
74 void orte_iof_orted_recv(int status, orte_process_name_t* sender,
75  opal_buffer_t* buffer, orte_rml_tag_t tag,
76  void* cbdata);
77 
78 void orte_iof_orted_read_handler(int fd, short event, void *data);
79 void orte_iof_orted_send_xonxoff(orte_iof_tag_t tag);
80 
81 END_C_DECLS
82 
83 #endif
Definition: types.h:146
Structure to represent a single event.
Definition: event_struct.h:87
Definition: iof.h:184
Definition: mutex_unix.h:53
I/O Forwarding Service The I/O forwarding service (IOF) is used to connect stdin, stdout...
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
IOF ORTED Component.
Definition: iof_orted.h:62
uint32_t orte_rml_tag_t
Message matching tag.
Definition: rml_types.h:220
Definition: opal_list.h:147
Structure for holding a buffer to be used with the RML or OOB subsystems.
Definition: dss_types.h:159
Contains the typedefs for the use of the rml.
IOF module.
Definition: iof.h:171