OpenMPI 0.1.1

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

- File List
- Globals

grpcomm.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 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$
13 *
14 * Additional copyrights may follow
15 *
16 * $HEADER$
17 */
18 /** @file:
19 *
20 * The OpenRTE Group Communications
21 *
22 * The OpenRTE Group Comm framework provides communication services that
23 * span entire jobs or collections of processes. It is not intended to be
24 * used for point-to-point communications (the RML does that), nor should
25 * it be viewed as a high-performance communication channel for large-scale
26 * data transfers.
27 */
28
29 #ifndef MCA_GRPCOMM_H
30 #define MCA_GRPCOMM_H
31
32 /*
33 * includes
34 */
35
36 #include "orte_config.h"
37 #include "orte/constants.h"
38 #include "orte/types.h"
39
40 #include "opal/mca/mca.h"
41 #include "opal/class/opal_list.h"
42 #include "opal/dss/dss_types.h"
43
44 #include "orte/mca/rml/rml_types.h"
45
46 #include "orte/mca/grpcomm/grpcomm_types.h"
47
48 BEGIN_C_DECLS
49
50 /*
51 * Component functions - all MUST be provided!
52 */
53
54 /* initialize the selected module */
55 typedef int (*orte_grpcomm_base_module_init_fn_t)(void);
56
57 /* finalize the selected module */
58 typedef void (*orte_grpcomm_base_module_finalize_fn_t)(void);
59
60 /* Send a message to all members of a job - blocking */
61 typedef int (*orte_grpcomm_base_module_xcast_fn_t)(orte_jobid_t job,
62 opal_buffer_t *buffer,
63 orte_rml_tag_t tag);
64
65 /* allgather - gather data from all procs */
66 typedef int (*orte_grpcomm_base_module_allgather_fn_t)(opal_buffer_t *sbuf, opal_buffer_t *rbuf);
67
68 typedef int (*orte_grpcomm_base_module_allgather_list_fn_t)(opal_list_t *names,
69 opal_buffer_t *sbuf, opal_buffer_t *rbuf);
70
71 /* barrier function */
72 typedef int (*orte_grpcomm_base_module_barrier_fn_t)(void);
73
74
75 /** DATA EXCHANGE FUNCTIONS - SEE ompi/runtime/ompi_module_exchange.h FOR A DESCRIPTION
76 * OF HOW THIS ALL WORKS
77 */
78
79 /* send an attribute buffer */
80 typedef int (*orte_grpcomm_base_module_modex_set_proc_attr_fn_t)(const char* attr_name,
81 const void *buffer, size_t size);
82
83 /* get an attribute buffer */
84 typedef int (*orte_grpcomm_base_module_modex_get_proc_attr_fn_t)(const orte_process_name_t name,
85 const char* attr_name,
86 void **buffer, size_t *size);
87
88 /* perform a modex operation */
89 typedef int (*orte_grpcomm_base_module_modex_fn_t)(opal_list_t *procs);
90
91 /* purge the internal attr table */
92 typedef int (*orte_grpcomm_base_module_purge_proc_attrs_fn_t)(void);
93
94
95 /*
96 * Ver 2.0
97 */
98 struct orte_grpcomm_base_module_2_0_0_t {
99 orte_grpcomm_base_module_init_fn_t init;
100 orte_grpcomm_base_module_finalize_fn_t finalize;
101 /* collective operations */
102 orte_grpcomm_base_module_xcast_fn_t xcast;
103 orte_grpcomm_base_module_allgather_fn_t allgather;
104 orte_grpcomm_base_module_allgather_list_fn_t allgather_list;
105 orte_grpcomm_base_module_barrier_fn_t barrier;
106 /* modex functions */
107 orte_grpcomm_base_module_modex_set_proc_attr_fn_t set_proc_attr;
108 orte_grpcomm_base_module_modex_get_proc_attr_fn_t get_proc_attr;
109 orte_grpcomm_base_module_modex_fn_t modex;
110 orte_grpcomm_base_module_purge_proc_attrs_fn_t purge_proc_attrs;
111 };
112
113 typedef struct orte_grpcomm_base_module_2_0_0_t orte_grpcomm_base_module_2_0_0_t;
114 typedef orte_grpcomm_base_module_2_0_0_t orte_grpcomm_base_module_t;
115
116 /*
117 * the standard component data structure
118 */
119 struct orte_grpcomm_base_component_2_0_0_t {
120 mca_base_component_t base_version;
121 mca_base_component_data_t base_data;
122 };
123 typedef struct orte_grpcomm_base_component_2_0_0_t orte_grpcomm_base_component_2_0_0_t;
124 typedef orte_grpcomm_base_component_2_0_0_t orte_grpcomm_base_component_t;
125
126
127
128 /*
129 * Macro for use in components that are of type grpcomm v2.0.0
130 */
131 #define ORTE_GRPCOMM_BASE_VERSION_2_0_0 \
132 /* grpcomm v2.0 is chained to MCA v2.0 */ \
133 MCA_BASE_VERSION_2_0_0, \
134 /* grpcomm v2.0 */ \
135 "grpcomm", 2, 0, 0
136
137 /* Global structure for accessing name server functions
138 */
139 ORTE_DECLSPEC extern orte_grpcomm_base_module_t orte_grpcomm; /* holds selected module's function pointers */
140
141 END_C_DECLS
142
143 #endif
mca_base_component_2_0_0_t
Common type for all MCA components.
Definition: mca.h:250
orte_jobid_t
uint32_t orte_jobid_t
Set the allowed range for ids in each space.
Definition: types.h:76
orte_grpcomm_base_module_modex_set_proc_attr_fn_t
int(* orte_grpcomm_base_module_modex_set_proc_attr_fn_t)(const char *attr_name, const void *buffer, size_t size)
DATA EXCHANGE FUNCTIONS - SEE ompi/runtime/ompi_module_exchange.h FOR A DESCRIPTION OF HOW THIS ALL W...
Definition: grpcomm.h:80
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...
mca.h
Top-level interface for all MCA components.
types.h
modex_attr_data_t::attr_name
char * attr_name
Attribute name.
Definition: grpcomm_base_modex.c:542
orte_grpcomm_base_module_2_0_0_t
Definition: grpcomm.h:98
dss_types.h
Buffer management types.
mca_base_component_data_2_0_0_t
Meta data for MCA v2.0.0 components.
Definition: mca.h:309
orte_rml_tag_t
uint32_t orte_rml_tag_t
Message matching tag.
Definition: rml_types.h:220
opal_list_t
Definition: opal_list.h:147
grpcomm_types.h
The OpenRTE Group Communications.
opal_buffer_t
Structure for holding a buffer to be used with the RML or OOB subsystems.
Definition: dss_types.h:159
orte_grpcomm_base_component_2_0_0_t
Definition: grpcomm.h:119
rml_types.h
Contains the typedefs for the use of the rml.