Newer
Older
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
/*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* ADIOSPy.cpp
*
* Created on: Mar 13, 2017
* Author: William F Godoy godoywf@ornl.gov
*/
#include "ADIOSPy.h"
#include "bindings/python/source/adiosPyTypes.h"
namespace adios
{
ADIOSPy::ADIOSPy(MPI_Comm mpiComm, const bool debug)
: m_DebugMode(debug), ADIOS(mpiComm, debug)
{
}
IOPy &ADIOSPy::DeclareIO(const std::string name)
{
return IOPy(m_ADIOS.DeclareIO(name), m_DebugMode);
}
// VariablePy ADIOSPy::DefineVariablePy(const std::string name,
// const pyList localDimensionsPy,
// const pyList globalDimensionsPy,
// const pyList globalOffsetsPy)
//{
// if (m_DebugMode == true)
// {
// if (m_VariablesPyNames.count(name) == 1)
// throw std::invalid_argument("ERROR: Variable " + name +
// " is already defined\n");
// }
//
// m_VariablesPyNames.insert(name);
// return VariablePy(name, localDimensionsPy, globalDimensionsPy,
// globalOffsetsPy);
//}
//
// void ADIOSPy::DefineVariableType(VariablePy &variablePy) {}
//
// EnginePy ADIOSPy::OpenPy(const std::string name, const std::string
// accessMode,
// const MethodPy &method, pyObject py_comm)
//{
// EnginePy enginePy(*this);
//
// bool isEmpty = IsEmpty(py_comm);
//
// if (isEmpty == true) // None
// {
// enginePy.m_Engine = Open(name, accessMode, method);
// }
// else
// {
// if (import_mpi4py() < 0)
// throw std::logic_error(
// "ERROR: could not import mpi4py communicator in Open " + name
// +
// "\n");
// MPI_Comm *comm_p = PyMPIComm_Get(py_comm.ptr());
// if (comm_p == nullptr)
// throw std::invalid_argument(
// "ERROR: MPI communicator is nullptr in Open " + name + "\n");
//
// enginePy.m_Engine = Open(name, accessMode, *comm_p, method);
// }
//
// return enginePy;
//}
} // end namespace