OpenMPI 0.1.1

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

- File List
- Globals

fbtl.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_FBTL_H
21 #define OMPI_MCA_FBTL_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 #include "ompi/request/request.h"
28 #ifdef HAVE_SYS_UIO_H
29 #include <sys/uio.h>
30 #endif
31
32 BEGIN_C_DECLS
33
34 struct mca_io_ompio_file_t;
35
36 /*
37 * Macro for use in components that are of type coll
38 */
39 #define MCA_FBTL_BASE_VERSION_2_0_0 \
40 MCA_BASE_VERSION_2_0_0, \
41 "fbtl", 2, 0, 0
42
43 /*
44 * The file byte transfer layer (fbtl) framework provides the abstraction
45 * for individual blocking and non-blocking read and write operations.
46 * The functionality provided by the interfaces in this module
47 * can be used to implement the corresponding operations in MPI I/O.
48 * Note however, that the interfaces are not a one-to-one mapping
49 * of the MPI individual read and write operations, since the fbtl framework
50 * avoids using derived MPI datatypes. The step mapping/unrolling the MPI
51 * derived data types into a vector of (offset into file, memory address, length)
52 * is done in the OMPIO module of the IO framework.
53 *
54 * These are the component function prototypes. These function pointers
55 * go into the component structure. These functions (query() and finalize()
56 * are called during fbtl_base_select(). Each component is query() ied
57 * and subsequently, all the unselected components are finalize() 'ed
58 * so that any *stuff* they did during query() can be undone. By
59 * similar logic, finalize() is also called on the component which
60 * was selected when the communicator is being destroyed.
61 *
62 * So, to sum it up, every component carries 4 functions:
63 * 1. open() - called during MPI_INIT
64 * 2. close() - called during MPI_FINALIZE
65 * 3. query() - called to select a particular component
66 * 4. finalize() - called when actions taken during query have
67 * to be undone
68 */
69
70 /*
71 * **************** component struct *******************************
72 * *********** These functions go in the component struct **********
73 * **************** component struct *******************************
74 */
75
76 typedef int (*mca_fbtl_base_component_init_query_1_0_0_fn_t)
77 (bool enable_progress_threads,
78 bool enable_mpi_threads);
79
80 typedef struct mca_fbtl_base_module_1_0_0_t *
81 (*mca_fbtl_base_component_file_query_1_0_0_fn_t) (struct mca_io_ompio_file_t *file,
82 int *priority);
83
84 typedef int (*mca_fbtl_base_component_file_unquery_1_0_0_fn_t)
85 (struct mca_io_ompio_file_t *file);
86
87 /*
88 * ****************** component struct ******************************
89 * Structure for fbtl v2.0.0 components.This is chained to MCA v2.0.0
90 * ****************** component struct ******************************
91 */
92 struct mca_fbtl_base_component_2_0_0_t {
93 mca_base_component_t fbtlm_version;
94 mca_base_component_data_t fbtlm_data;
95
96 mca_fbtl_base_component_init_query_1_0_0_fn_t fbtlm_init_query;
97 mca_fbtl_base_component_file_query_1_0_0_fn_t fbtlm_file_query;
98 mca_fbtl_base_component_file_unquery_1_0_0_fn_t fbtlm_file_unquery;
99 };
100 typedef struct mca_fbtl_base_component_2_0_0_t mca_fbtl_base_component_2_0_0_t;
101 typedef struct mca_fbtl_base_component_2_0_0_t mca_fbtl_base_component_t;
102
103 /*
104 * ***********************************************************************
105 * ************************ Interface function definitions **************
106 * These are the typedefbtl for the function pointers to various fbtl
107 * backend functions which will be used by the various fbtl components
108 * ***********************************************************************
109 */
110
111 typedef int (*mca_fbtl_base_module_init_1_0_0_fn_t)
112 (struct mca_io_ompio_file_t *file);
113
114 typedef int (*mca_fbtl_base_module_finalize_1_0_0_fn_t)
115 (struct mca_io_ompio_file_t *file);
116
117
118 typedef size_t (*mca_fbtl_base_module_preadv_fn_t)
119 (struct mca_io_ompio_file_t *file,
120 int *sorted);
121 typedef size_t (*mca_fbtl_base_module_pwritev_fn_t)
122 (struct mca_io_ompio_file_t *file,
123 int *sorted);
124 typedef size_t (*mca_fbtl_base_module_ipreadv_fn_t)
125 (struct mca_io_ompio_file_t *file,
126 int *sorted,
127 ompi_request_t **request);
128 typedef size_t (*mca_fbtl_base_module_ipwritev_fn_t)
129 (struct mca_io_ompio_file_t *file,
130 int *sorted,
131 ompi_request_t **request);
132
133 /*
134 * ***********************************************************************
135 * *************************** module structure *************************
136 * ***********************************************************************
137 */
138 struct mca_fbtl_base_module_1_0_0_t {
139 /*
140 * Per-file initialization function. This is called only
141 * on the module which is selected. The finalize corresponding to
142 * this function is present on the component struct above
143 */
144 mca_fbtl_base_module_init_1_0_0_fn_t fbtl_module_init;
145 mca_fbtl_base_module_finalize_1_0_0_fn_t fbtl_module_finalize;
146
147 /* FBTL function pointers */
148 mca_fbtl_base_module_preadv_fn_t fbtl_preadv;
149 mca_fbtl_base_module_ipreadv_fn_t fbtl_ipreadv;
150 mca_fbtl_base_module_pwritev_fn_t fbtl_pwritev;
151 mca_fbtl_base_module_ipwritev_fn_t fbtl_ipwritev;
152 /*
153 mca_fbtl_base_module_test_fn_t fbtl_test;
154 mca_fbtl_base_module_wait_fn_t fbtl_wait;
155 mca_fbtl_base_module_progress_fn_t fbtl_progress;
156 */
157 };
158 typedef struct mca_fbtl_base_module_1_0_0_t mca_fbtl_base_module_1_0_0_t;
159 typedef mca_fbtl_base_module_1_0_0_t mca_fbtl_base_module_t;
160
161 END_C_DECLS
162
163 #endif /* OMPI_MCA_FBTL_H */
mca_fbtl_base_module_1_0_0_t
Definition: fbtl.h:138
mca_base_component_2_0_0_t
Common type for all MCA components.
Definition: mca.h:250
mca.h
Top-level interface for all MCA components.
request.h
Top-level description of requests.
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
request
Definition: evdns.c:158
mca_fbtl_base_component_2_0_0_t
Definition: fbtl.h:92
ompi_request_t
Main top-level request struct definition.
Definition: request.h:100