OpenMPI  0.1.1
iof_hnp.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$
14  *
15  * Additional copyrights may follow
16  *
17  * $HEADER$
18  */
19 /**
20  * @file
21  *
22  * The hnp IOF component is used in HNP processes only. It is the
23  * "hub" for all IOF activity, meaning that *all* IOF traffic is
24  * routed to the hnp component, and this component figures out where
25  * it is supposed to go from there. Specifically: there is *no*
26  * direct proxy-to-proxy IOF communication. If a proxy/orted wants to
27  * get a stream from another proxy/orted, the stream will go
28  * proxy/orted -> HNP -> proxy/orted.
29  *
30  * The hnp IOF component does two things: 1. forward fragments between
31  * file descriptors and streams, and 2. maintain forwarding tables to
32  * "route" incoming fragments to outgoing destinations (both file
33  * descriptors and other published streams).
34  *
35  */
36 
37 #ifndef ORTE_IOF_HNP_H
38 #define ORTE_IOF_HNP_H
39 
40 #include "orte_config.h"
41 
42 #ifdef HAVE_SYS_TYPES_H
43 #include <sys/types.h>
44 #endif /* HAVE_SYS_TYPES_H */
45 #ifdef HAVE_SYS_UIO_H
46 #include <sys/uio.h>
47 #endif /* HAVE_SYS_UIO_H */
48 #ifdef HAVE_NET_UIO_H
49 #include <net/uio.h>
50 #endif /* HAVE_NET_UIO_H */
51 
52 #include "orte/mca/iof/iof.h"
53 #include "orte/mca/iof/base/base.h"
54 
55 
56 BEGIN_C_DECLS
57 
58 /**
59  * IOF HNP Component
60  */
63  opal_list_t sinks;
64  opal_list_t procs;
65  orte_iof_read_event_t *stdinev;
66  opal_event_t stdinsig;
67  opal_mutex_t lock;
68 };
70 
71 ORTE_MODULE_DECLSPEC extern orte_iof_hnp_component_t mca_iof_hnp_component;
72 extern orte_iof_base_module_t orte_iof_hnp_module;
73 
74 void orte_iof_hnp_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_hnp_read_local_handler(int fd, short event, void *cbdata);
79 void orte_iof_hnp_stdin_cb(int fd, short event, void *cbdata);
80 bool orte_iof_hnp_stdin_check(int fd);
81 
82 int orte_iof_hnp_send_data_to_endpoint(orte_process_name_t *host,
83  orte_process_name_t *target,
84  orte_iof_tag_t tag,
85  unsigned char *data, int numbytes);
86 
87 END_C_DECLS
88 
89 #endif
Definition: base.h:86
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...
I/O Forwarding Service.
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
IOF HNP Component.
Definition: iof_hnp.h:61
IOF module.
Definition: iof.h:171