1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 #ifndef MCA_SHAREDFP_LOCKEDFILE_H
24 #define MCA_SHAREDFP_LOCKEDFILE_H
25
26 #include "ompi_config.h"
27 #include "ompi/mca/mca.h"
28 #include "ompi/mca/sharedfp/sharedfp.h"
29 #include "ompi/mca/common/ompio/common_ompio.h"
30
31
32 BEGIN_C_DECLS
33
34 int mca_sharedfp_lockedfile_component_init_query(bool enable_progress_threads,
35 bool enable_mpi_threads);
36 struct mca_sharedfp_base_module_1_0_0_t *
37 mca_sharedfp_lockedfile_component_file_query (ompio_file_t *file, int *priority);
38 int mca_sharedfp_lockedfile_component_file_unquery (ompio_file_t *file);
39
40 int mca_sharedfp_lockedfile_module_init (ompio_file_t *file);
41 int mca_sharedfp_lockedfile_module_finalize (ompio_file_t *file);
42
43 extern int mca_sharedfp_lockedfile_priority;
44 extern int mca_sharedfp_lockedfile_verbose;
45
46 OMPI_MODULE_DECLSPEC extern mca_sharedfp_base_component_2_0_0_t mca_sharedfp_lockedfile_component;
47
48
49
50
51
52
53
54 int mca_sharedfp_lockedfile_seek (ompio_file_t *fh,
55 OMPI_MPI_OFFSET_TYPE offset, int whence);
56 int mca_sharedfp_lockedfile_get_position (ompio_file_t *fh,
57 OMPI_MPI_OFFSET_TYPE * offset);
58 int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm,
59 const char* filename,
60 int amode,
61 struct opal_info_t *info,
62 ompio_file_t *fh);
63 int mca_sharedfp_lockedfile_file_close (ompio_file_t *fh);
64 int mca_sharedfp_lockedfile_read (ompio_file_t *fh,
65 void *buf, int count, MPI_Datatype datatype, MPI_Status *status);
66 int mca_sharedfp_lockedfile_read_ordered (ompio_file_t *fh,
67 void *buf, int count, struct ompi_datatype_t *datatype,
68 ompi_status_public_t *status
69 );
70 int mca_sharedfp_lockedfile_read_ordered_begin (ompio_file_t *fh,
71 void *buf,
72 int count,
73 struct ompi_datatype_t *datatype);
74 int mca_sharedfp_lockedfile_read_ordered_end (ompio_file_t *fh,
75 void *buf,
76 ompi_status_public_t *status);
77 int mca_sharedfp_lockedfile_iread (ompio_file_t *fh,
78 void *buf,
79 int count,
80 struct ompi_datatype_t *datatype,
81 ompi_request_t **request);
82 int mca_sharedfp_lockedfile_write (ompio_file_t *fh,
83 const void *buf,
84 int count,
85 struct ompi_datatype_t *datatype,
86 ompi_status_public_t *status);
87 int mca_sharedfp_lockedfile_write_ordered (ompio_file_t *fh,
88 const void *buf,
89 int count,
90 struct ompi_datatype_t *datatype,
91 ompi_status_public_t *status);
92 int mca_sharedfp_lockedfile_write_ordered_begin (ompio_file_t *fh,
93 const void *buf,
94 int count,
95 struct ompi_datatype_t *datatype);
96 int mca_sharedfp_lockedfile_write_ordered_end (ompio_file_t *fh,
97 const void *buf,
98 ompi_status_public_t *status);
99 int mca_sharedfp_lockedfile_iwrite (ompio_file_t *fh,
100 const void *buf,
101 int count,
102 struct ompi_datatype_t *datatype,
103 ompi_request_t **request);
104
105
106
107
108
109
110
111
112 struct mca_sharedfp_lockedfile_data
113 {
114 int handle;
115 char* filename;
116 };
117
118 typedef struct mca_sharedfp_lockedfile_data lockedfile_data;
119
120
121 int mca_sharedfp_lockedfile_request_position (struct mca_sharedfp_base_data_t * sh,
122 int bytes_requested,
123 OMPI_MPI_OFFSET_TYPE * offset);
124
125
126
127
128
129
130 END_C_DECLS
131
132 #endif