OpenMPI 0.1.1

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

- File List
- Globals

fcoll.h
1 /*
2 * Copyright (c) 2004-2005 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 (c) 2008-2011 University of Houston. All rights reserved.
13 * $COPYRIGHT$
14 *
15 * Additional copyrights may follow
16 *
17 * $HEADER$
18 */
19
20 #ifndef OMPI_MCA_FCOLL_H
21 #define OMPI_MCA_FCOLL_H
22
23 #include "ompi_config.h"
24 #include "mpi.h"
25 #include "opal/mca/mca.h"
26 #include "opal/mca/base/base.h"
27
28 BEGIN_C_DECLS
29
30 struct mca_io_ompio_file_t;
31
32 /*
33 * Macro for use in components that are of type coll
34 */
35 #define MCA_FCOLL_BASE_VERSION_2_0_0 \
36 MCA_BASE_VERSION_2_0_0, \
37 "fcoll", 2, 0, 0
38
39 /*
40 * This framework provides the abstraction for the collective file
41 * read and write operations of MPI I/O. The interfaces include
42 * blocking collective operations using the individual file pointer,
43 * blocking collective operations using explicit offsets and
44 * the split collective operations defined in MPI/O for the same.
45 *
46 * These are the component function prototypes. These function pointers
47 * go into the component structure. These functions (query() and finalize()
48 * are called during fcoll_base_select(). Each component is query() ied
49 * and subsequently, all the unselected components are finalize() 'ed
50 * so that any *stuff* they did during query() can be undone. By
51 * similar logic, finalize() is also called on the component which
52 * was selected when the communicator is being destroyed.
53 *
54 * So, to sum it up, every component carries 4 functions:
55 * 1. open() - called during MPI_INIT
56 * 2. close() - called during MPI_FINALIZE
57 * 3. query() - called to select a particular component
58 * 4. finalize() - called when actions taken during query have
59 * to be undone
60 */
61
62 /*
63 * **************** component struct *******************************
64 * *********** These functions go in the component struct **********
65 * **************** component struct *******************************
66 */
67
68 typedef int (*mca_fcoll_base_component_init_query_1_0_0_fn_t)
69 (bool enable_progress_threads,
70 bool enable_mpi_threads);
71
72 typedef struct mca_fcoll_base_module_1_0_0_t *
73 (*mca_fcoll_base_component_file_query_1_0_0_fn_t) (struct mca_io_ompio_file_t *file,
74 int *priority);
75
76 typedef int (*mca_fcoll_base_component_file_unquery_1_0_0_fn_t)
77 (struct mca_io_ompio_file_t *file);
78
79 /*
80 * ****************** component struct ******************************
81 * Structure for fcoll v2.0.0 components.This is chained to MCA v2.0.0
82 * ****************** component struct ******************************
83 */
84 struct mca_fcoll_base_component_2_0_0_t {
85 mca_base_component_t fcollm_version;
86 mca_base_component_data_t fcollm_data;
87
88 mca_fcoll_base_component_init_query_1_0_0_fn_t fcollm_init_query;
89 mca_fcoll_base_component_file_query_1_0_0_fn_t fcollm_file_query;
90 mca_fcoll_base_component_file_unquery_1_0_0_fn_t fcollm_file_unquery;
91 };
92 typedef struct mca_fcoll_base_component_2_0_0_t mca_fcoll_base_component_2_0_0_t;
93 typedef struct mca_fcoll_base_component_2_0_0_t mca_fcoll_base_component_t;
94
95 /*
96 * ***********************************************************************
97 * ************************ Interface function definitions **************
98 * These are the typedefcoll for the function pointers to various fcoll
99 * backend functions which will be used by the various fcoll components
100 * ***********************************************************************
101 */
102
103 typedef int (*mca_fcoll_base_module_init_1_0_0_fn_t)
104 (struct mca_io_ompio_file_t *file);
105
106 typedef int (*mca_fcoll_base_module_finalize_1_0_0_fn_t)
107 (struct mca_io_ompio_file_t *file);
108
109 typedef int (*mca_fcoll_base_module_file_read_all_fn_t)
110 (struct mca_io_ompio_file_t *fh,
111 void *buf,
112 int count,
113 struct ompi_datatype_t *datatype,
114 ompi_status_public_t *status);
115
116 typedef int (*mca_fcoll_base_module_file_read_all_begin_fn_t)
117 (struct mca_io_ompio_file_t *fh,
118 void *buf,
119 int count,
120 struct ompi_datatype_t *datatype);
121
122 typedef int (*mca_fcoll_base_module_file_read_all_end_fn_t)
123 (struct mca_io_ompio_file_t *fh,
124 void *buf,
125 ompi_status_public_t *status);
126
127 typedef int (*mca_fcoll_base_module_file_write_all_fn_t)
128 (struct mca_io_ompio_file_t *fh,
129 void *buf,
130 int count,
131 struct ompi_datatype_t *datatype,
132 ompi_status_public_t *status);
133
134 typedef int (*mca_fcoll_base_module_file_write_all_begin_fn_t)
135 (struct mca_io_ompio_file_t *fh,
136 void *buf,
137 int count,
138 struct ompi_datatype_t *datatype);
139
140 typedef int (*mca_fcoll_base_module_file_write_all_end_fn_t)
141 (struct mca_io_ompio_file_t *fh,
142 void *buf,
143 ompi_status_public_t *status);
144
145 /*
146 * ***********************************************************************
147 * *************************** module structure *************************
148 * ***********************************************************************
149 */
150 struct mca_fcoll_base_module_1_0_0_t {
151 /*
152 * Per-file initialization function. This is called only
153 * on the module which is selected. The finalize corresponding to
154 * this function is present on the component struct above
155 */
156 mca_fcoll_base_module_init_1_0_0_fn_t fcoll_module_init;
157 mca_fcoll_base_module_finalize_1_0_0_fn_t fcoll_module_finalize;
158
159 /* FCOLL function pointers */
160 mca_fcoll_base_module_file_read_all_fn_t fcoll_file_read_all;
161 mca_fcoll_base_module_file_read_all_begin_fn_t fcoll_file_read_all_begin;
162 mca_fcoll_base_module_file_read_all_end_fn_t fcoll_file_read_all_end;
163 mca_fcoll_base_module_file_write_all_fn_t fcoll_file_write_all;
164 mca_fcoll_base_module_file_write_all_begin_fn_t fcoll_file_write_all_begin;
165 mca_fcoll_base_module_file_write_all_end_fn_t fcoll_file_write_all_end;
166 };
167 typedef struct mca_fcoll_base_module_1_0_0_t mca_fcoll_base_module_1_0_0_t;
168 typedef mca_fcoll_base_module_1_0_0_t mca_fcoll_base_module_t;
169
170 END_C_DECLS
171
172 #endif /* OMPI_MCA_FCOLL_H */
mca_base_component_2_0_0_t
Common type for all MCA components.
Definition: mca.h:250
ompi_datatype_t
Definition: ompi_datatype.h:68
mca_fcoll_base_module_1_0_0_t
Definition: fcoll.h:150
mca.h
Top-level interface for all MCA components.
mca_io_ompio_file_t
Back-end structure for MPI_File.
Definition: io_ompio.h:121
mca_base_component_data_2_0_0_t
Meta data for MCA v2.0.0 components.
Definition: mca.h:309
ompi_status_public_t
Definition: mpi.h:337
mca_fcoll_base_component_2_0_0_t
Definition: fcoll.h:84