-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAdiosStMan.h
More file actions
134 lines (106 loc) · 4.36 KB
/
AdiosStMan.h
File metadata and controls
134 lines (106 loc) · 4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// (c) University of Western Australia
// International Centre of Radio Astronomy Research
// M468, 35 Stirling Hwy
// Crawley, Perth WA 6009
// Australia
//
// Shanghai Astronomical Observatory, Chinese Academy of Sciences
// 80 Nandan Road, Shanghai 200030, China
//
// This library is free software: you can redistribute it and/or
// modify it under the terms of the GNU General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library. If not, see <http://www.gnu.org/licenses/>.
//
// Any bugs, questions, concerns and/or suggestions please email to
// lbq@shao.ac.cn, jason.wang@icrar.org
#ifndef ADIOSSTMAN_H
#define ADIOSSTMAN_H
#include "AdiosStManGlobal.h"
#ifdef CASACORE_VERSION_1
#include <tables/Tables/DataManager.h>
#include <tables/Tables/Table.h>
#include <casa/IO/AipsIO.h>
#endif
#ifdef CASACORE_VERSION_2
#include <casacore/tables/DataMan/DataManager.h>
#include <casacore/tables/Tables/Table.h>
#include <casacore/casa/IO/AipsIO.h>
#endif
#include <adios.h>
#include <adios_read.h>
namespace casacore {
class AdiosStManColumn;
class AdiosStMan : public DataManager
{
public:
AdiosStMan(string aMethod="POSIX", string aPara="", uint64_t aBufRows=100, uint64_t aRowsPerProcess = 0);
~AdiosStMan();
virtual DataManager* clone() const;
virtual String dataManagerType() const;
virtual String dataManagerName() const;
virtual void create (uInt aNrRows);
virtual void open (uInt aRowNr, AipsIO&);
virtual void resync (uInt aRowNr);
virtual Bool flush (AipsIO&, Bool doFsync);
DataManagerColumn* makeColumnMeta (const String& aName, int aDataType, const String& aDataTypeID, char columnType);
virtual DataManagerColumn* makeScalarColumn (const String& aName, int aDataType, const String& aDataTypeID);
virtual DataManagerColumn* makeDirArrColumn (const String& aName, int aDataType, const String& aDataTypeID);
virtual DataManagerColumn* makeIndArrColumn (const String& aName, int aDataType, const String& aDataTypeID);
virtual void deleteManager();
virtual void addRow (uInt aNrRows);
int64_t getAdiosFile();
int64_t getAdiosGroup();
ADIOS_FILE* getAdiosReadFile();
static DataManager* makeObject (const String& aDataManType, const Record& spec);
void adiosWriteInit();
void adiosWriteOpen(uint64_t rownr);
void adiosWriteClose();
uInt getNrRows();
char getMode();
uint64_t getBufRows();
uint64_t getAdiosNrBufRows();
uint64_t getMpiRank();
uint64_t getRowsPerProcess();
void logdbg(string func, string stat, int para=0);
private:
AdiosStMan(const AdiosStMan& that);
String itsDataManName;
int64_t itsAdiosWriteFile;
int64_t itsAdiosGroup;
uint64_t itsNrAdiosFiles;
uint64_t itsAdiosBufRows;
uInt itsAdiosNrBufRows;
uint64_t itsAdiosBufsize;
uint64_t itsAdiosWriteRows;
uint64_t itsAdiosGroupsize;
uint64_t itsAdiosTotalsize;
string itsAdiosTransMethod;
string itsAdiosTransPara;
uInt itsAdiosStart;
ADIOS_FILE *itsAdiosReadFile;
int mpiRank;
int mpiSize;
uint64_t rows_per_process;
bool isMpiInitInternal;
static int itsNrInstances;
PtrBlock<AdiosStManColumn*> itsColumnPtrBlk;
uInt itsNrRows;
uInt itsNrCols;
MPI_Comm itsMpiComm;
char itsMode;
int itsStManColumnType;
string logdbgLast;
uint64_t logdbgCount;
}; // end of class AdiosStMan
extern "C" void register_adiosstman();
} // end of namespace casa
#endif