00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 typedef void Datarep_extent_function(const Datatype& datatype,
00023 Aint& file_extent, void* extra_state);
00024 typedef void Datarep_conversion_function(void* userbuf, Datatype& datatype,
00025 int count, void* filebuf,
00026 Offset position, void* extra_state);
00027
00028
00029 void Register_datarep(const char* datarep,
00030 Datarep_conversion_function* read_conversion_fn,
00031 Datarep_conversion_function* write_conversion_fn,
00032 Datarep_extent_function* dtype_file_extent_fn,
00033 void* extra_state);
00034
00035
00036 void Register_datarep(const char* datarep,
00037 MPI_Datarep_conversion_function* read_conversion_fn,
00038 Datarep_conversion_function* write_conversion_fn,
00039 Datarep_extent_function* dtype_file_extent_fn,
00040 void* extra_state);
00041
00042
00043 void Register_datarep(const char* datarep,
00044 Datarep_conversion_function* read_conversion_fn,
00045 MPI_Datarep_conversion_function* write_conversion_fn,
00046 Datarep_extent_function* dtype_file_extent_fn,
00047 void* extra_state);
00048
00049
00050 void Register_datarep(const char* datarep,
00051 MPI_Datarep_conversion_function* read_conversion_fn,
00052 MPI_Datarep_conversion_function* write_conversion_fn,
00053 Datarep_extent_function* dtype_file_extent_fn,
00054 void* extra_state);
00055
00056 class File {
00057 #if 0
00058
00059
00060 #endif
00061 friend class MPI::Comm;
00062 friend class MPI::Request;
00063
00064 public:
00065 #if 0
00066
00067
00068 File() { }
00069 virtual ~File() { }
00070
00071
00072
00073 File(const File& data) : pmpi_file(data.pmpi_file) { }
00074
00075 File(MPI_File i) : pmpi_file(i) { }
00076
00077 File& operator=(const File& data) {
00078 pmpi_file = data.pmpi_file; return *this; }
00079
00080
00081
00082
00083 File& operator= (const MPI_File &i) {
00084 pmpi_file = i; return *this; }
00085 operator MPI_File () const { return pmpi_file; }
00086
00087 operator const PMPI::File&() const { return pmpi_file; }
00088
00089 #else
00090
00091 File() : mpi_file(MPI_FILE_NULL) { }
00092
00093 File(const File& data) : mpi_file(data.mpi_file) { }
00094
00095 File(MPI_File i) : mpi_file(i) { }
00096
00097 virtual ~File() { }
00098
00099 File& operator=(const File& data) {
00100 mpi_file = data.mpi_file; return *this; }
00101
00102
00103
00104
00105 File& operator= (const MPI_File &i) {
00106 mpi_file = i; return *this; }
00107 operator MPI_File () const { return mpi_file; }
00108
00109
00110 #endif
00111
00112
00113
00114 void Close();
00115
00116 static void Delete(const char* filename, const MPI::Info& info);
00117
00118 int Get_amode() const;
00119
00120 bool Get_atomicity() const;
00121
00122 MPI::Offset Get_byte_offset(const MPI::Offset disp) const;
00123
00124 MPI::Group Get_group() const;
00125
00126 MPI::Info Get_info() const;
00127
00128 MPI::Offset Get_position() const;
00129
00130 MPI::Offset Get_position_shared() const;
00131
00132 MPI::Offset Get_size() const;
00133
00134 MPI::Aint Get_type_extent(const MPI::Datatype& datatype) const;
00135
00136 void Get_view(MPI::Offset& disp, MPI::Datatype& etype,
00137 MPI::Datatype& filetype, char* datarep) const;
00138
00139 MPI::Request Iread(void* buf, int count,
00140 const MPI::Datatype& datatype);
00141
00142 MPI::Request Iread_at(MPI::Offset offset, void* buf, int count,
00143 const MPI::Datatype& datatype);
00144
00145 MPI::Request Iread_shared(void* buf, int count,
00146 const MPI::Datatype& datatype);
00147
00148 MPI::Request Iwrite(const void* buf, int count,
00149 const MPI::Datatype& datatype);
00150
00151 MPI::Request Iwrite_at(MPI::Offset offset, const void* buf,
00152 int count, const MPI::Datatype& datatype);
00153
00154 MPI::Request Iwrite_shared(const void* buf, int count,
00155 const MPI::Datatype& datatype);
00156
00157 static MPI::File Open(const MPI::Intracomm& comm,
00158 const char* filename, int amode,
00159 const MPI::Info& info);
00160
00161 void Preallocate(MPI::Offset size);
00162
00163 void Read(void* buf, int count, const MPI::Datatype& datatype);
00164
00165 void Read(void* buf, int count, const MPI::Datatype& datatype,
00166 MPI::Status& status);
00167
00168 void Read_all(void* buf, int count, const MPI::Datatype& datatype);
00169
00170 void Read_all(void* buf, int count, const MPI::Datatype& datatype,
00171 MPI::Status& status);
00172
00173 void Read_all_begin(void* buf, int count,
00174 const MPI::Datatype& datatype);
00175
00176 void Read_all_end(void* buf);
00177
00178 void Read_all_end(void* buf, MPI::Status& status);
00179
00180 void Read_at(MPI::Offset offset,
00181 void* buf, int count, const MPI::Datatype& datatype);
00182
00183 void Read_at(MPI::Offset offset, void* buf, int count,
00184 const MPI::Datatype& datatype, MPI::Status& status);
00185
00186 void Read_at_all(MPI::Offset offset, void* buf, int count,
00187 const MPI::Datatype& datatype);
00188
00189 void Read_at_all(MPI::Offset offset, void* buf, int count,
00190 const MPI::Datatype& datatype, MPI::Status& status);
00191
00192 void Read_at_all_begin(MPI::Offset offset, void* buf, int count,
00193 const MPI::Datatype& datatype);
00194
00195 void Read_at_all_end(void* buf);
00196
00197 void Read_at_all_end(void* buf, MPI::Status& status);
00198
00199 void Read_ordered(void* buf, int count,
00200 const MPI::Datatype& datatype);
00201
00202 void Read_ordered(void* buf, int count,
00203 const MPI::Datatype& datatype,
00204 MPI::Status& status);
00205
00206 void Read_ordered_begin(void* buf, int count,
00207 const MPI::Datatype& datatype);
00208
00209 void Read_ordered_end(void* buf);
00210
00211 void Read_ordered_end(void* buf, MPI::Status& status);
00212
00213 void Read_shared(void* buf, int count,
00214 const MPI::Datatype& datatype);
00215
00216 void Read_shared(void* buf, int count,
00217 const MPI::Datatype& datatype, MPI::Status& status);
00218
00219 void Seek(MPI::Offset offset, int whence);
00220
00221 void Seek_shared(MPI::Offset offset, int whence);
00222
00223 void Set_atomicity(bool flag);
00224
00225 void Set_info(const MPI::Info& info);
00226
00227 void Set_size(MPI::Offset size);
00228
00229 void Set_view(MPI::Offset disp, const MPI::Datatype& etype,
00230 const MPI::Datatype& filetype, const char* datarep,
00231 const MPI::Info& info);
00232
00233 void Sync();
00234
00235 void Write(const void* buf, int count,
00236 const MPI::Datatype& datatype);
00237
00238 void Write(const void* buf, int count,
00239 const MPI::Datatype& datatype, MPI::Status& status);
00240
00241 void Write_all(const void* buf, int count,
00242 const MPI::Datatype& datatype);
00243
00244 void Write_all(const void* buf, int count,
00245 const MPI::Datatype& datatype, MPI::Status& status);
00246
00247 void Write_all_begin(const void* buf, int count,
00248 const MPI::Datatype& datatype);
00249
00250 void Write_all_end(const void* buf);
00251
00252 void Write_all_end(const void* buf, MPI::Status& status);
00253
00254 void Write_at(MPI::Offset offset, const void* buf, int count,
00255 const MPI::Datatype& datatype);
00256
00257 void Write_at(MPI::Offset offset, const void* buf, int count,
00258 const MPI::Datatype& datatype, MPI::Status& status);
00259
00260 void Write_at_all(MPI::Offset offset, const void* buf, int count,
00261 const MPI::Datatype& datatype);
00262
00263 void Write_at_all(MPI::Offset offset, const void* buf, int count,
00264 const MPI::Datatype& datatype,
00265 MPI::Status& status);
00266
00267 void Write_at_all_begin(MPI::Offset offset, const void* buf,
00268 int count, const MPI::Datatype& datatype);
00269
00270 void Write_at_all_end(const void* buf);
00271
00272 void Write_at_all_end(const void* buf, MPI::Status& status);
00273
00274 void Write_ordered(const void* buf, int count,
00275 const MPI::Datatype& datatype);
00276
00277 void Write_ordered(const void* buf, int count,
00278 const MPI::Datatype& datatype, MPI::Status& status);
00279
00280 void Write_ordered_begin(const void* buf, int count,
00281 const MPI::Datatype& datatype);
00282
00283 void Write_ordered_end(const void* buf);
00284
00285 void Write_ordered_end(const void* buf, MPI::Status& status);
00286
00287 void Write_shared(const void* buf, int count,
00288 const MPI::Datatype& datatype);
00289
00290 void Write_shared(const void* buf, int count,
00291 const MPI::Datatype& datatype, MPI::Status& status);
00292
00293
00294
00295
00296 typedef void Errhandler_fn(MPI::File &, int *, ... );
00297
00298 static MPI::Errhandler Create_errhandler(Errhandler_fn* function);
00299
00300 MPI::Errhandler Get_errhandler() const;
00301
00302 void Set_errhandler(const MPI::Errhandler& errhandler) const;
00303
00304 void Call_errhandler(int errorcode) const;
00305
00306 protected:
00307 #if 0
00308 PMPI::File pmpi_file;
00309
00310 #else
00311 MPI_File mpi_file;
00312
00313 #endif
00314 };
00315