XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
adios2.hpp
Go to the documentation of this file.
1 #ifndef ADIOS2_HPP
2 #define ADIOS2_HPP
3 
4 #include <adios2.h>
5 #include <mpi.h>
6 #include <memory>
7 
8 void ADIOS2Init(const std::string configFile, MPI_Comm &comm);
9 
10 using ADIOS2Ptr = std::shared_ptr<adios2::ADIOS>;
11 using EnginePtr = std::shared_ptr<adios2::Engine>;
12 using IOPtr = std::shared_ptr<adios2::IO>;
13 
15 
16 // communicator for processes on the same compute node
17 // used only for IO
18 extern MPI_Comm SML_COMM_COMPNODE;
19 extern int SML_COMM_RANK_COMPNODE;
20 extern int SML_COMM_SIZE_COMPNODE;
21 
22 extern MPI_Comm SML_COMM_ONEPERNODE;
23 extern int SML_COMM_RANK_ONEPERNODE;
24 extern int SML_COMM_SIZE_ONEPERNODE;
25 
27 {
28 public:
31  adios2::Mode mode;
32 
33  ADIOS2Stream();
34  ADIOS2Stream(const std::string &IOName);
35  ~ADIOS2Stream();
36 
37  void Init(const std::string &IOName);
38  IOPtr DeclareIO(const std::string &IOName);
39  void Open(const std::string &StreamName, const adios2::Mode mode);
40  void Open(const std::string &StreamName, const adios2::Mode mode, const MPI_Comm &comm);
41  void Close();
42 
43 private:
44  const std::string m_StreamName;
45 
46 };
47 
48 ADIOS2Stream* ADIOS2Lookup(const std::string &IOName);
49 
50 #endif
const std::string m_StreamName
Definition: adios2.hpp:44
int SML_COMM_RANK_COMPNODE
std::shared_ptr< adios2::Engine > EnginePtr
Definition: adios2.hpp:11
void Open(const std::string &StreamName, const adios2::Mode mode)
int SML_COMM_RANK_ONEPERNODE
int SML_COMM_SIZE_COMPNODE
void Init(const std::string &IOName)
ADIOS2Ptr GetADIOSPtr2()
EnginePtr engine
Definition: adios2.hpp:30
std::shared_ptr< adios2::IO > IOPtr
Definition: adios2.hpp:12
Definition: adios2.hpp:26
MPI_Comm SML_COMM_COMPNODE
MPI_Comm SML_COMM_ONEPERNODE
adios2::Mode mode
Definition: adios2.hpp:31
std::shared_ptr< adios2::ADIOS > ADIOS2Ptr
Definition: adios2.hpp:10
ADIOS2Stream * ADIOS2Lookup(const std::string &IOName)
IOPtr io
Definition: adios2.hpp:29
void ADIOS2Init(const std::string configFile, MPI_Comm &comm)
int SML_COMM_SIZE_ONEPERNODE
IOPtr DeclareIO(const std::string &IOName)