Bridge++  Version 1.4.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fieldIO_Binary_Parallel.h
Go to the documentation of this file.
1 
14 #ifndef FIELDIO_BINARY_PARALLEL_INCLUDED
15 #define FIELDIO_BINARY_PARALLEL_INCLUDED
16 
17 #include <string>
18 using std::string;
19 
20 #ifdef USE_MPI
21 #include <mpi.h>
22 #ifdef USE_BGNET
24 #else
26 #endif
27 #endif
28 
29 #include "fieldIO.h"
30 
31 #include "bridgeIO.h"
32 using Bridge::vout;
33 
35 
54 #ifdef USE_MPI
55 class FieldIO_Binary_Parallel : public FieldIO
56 {
57  public:
58  static const std::string class_name;
59 
60  public:
63 
64  void read_file(Field *v, string filename);
65  void write_file(Field *v, string filename);
66 
67  private:
68 
69  bool m_is_initialized;
70 
71  int m_nvol;
72  int m_nin_file;
73  int m_nex_file;
74 
75  MPI_Datatype m_type_vector;
76  MPI_Datatype m_type_tiled;
77 
78  int initialize(const Field *v);
79  int finalize();
80  int clear_layout();
81 
82 };
83 
84 #else
85 
86 // for Single version, just an alias of FieldIO_Binary.
87 
89 {
90  public:
92 };
93 #endif
94 #endif
BridgeIO vout
Definition: bridgeIO.cpp:495
Container of Field-type object.
Definition: field.h:39
FieldIO_Binary_Parallel(const IO_Format::Format *format)
void write_file(Field *v, string filename)
FieldIO_Binary_Parallel class for file I/O of Field data in binary format using MPI parallel I/O...
FieldIO_Binary class for file I/O of Field data in binary format.
void read_file(Field *v, string filename)
static const std::string class_name
FieldIO class for file I/O of space-time distributed data.
Definition: fieldIO.h:53