diff --git a/bindings/python/Makefile b/bindings/python/Makefile index d7f98bb0786a20d6b40c94caeb1d6f4dc7d2ae53..2f9f607d7e79927b4a817b53da7ccf47eeee99de 100644 --- a/bindings/python/Makefile +++ b/bindings/python/Makefile @@ -19,7 +19,7 @@ ADIOS2_INC:= /usr/local/include ADIOS2_LIB:= /usr/local/lib # PyBind11 -PyBind11_INC:= /home/wfg/workspace/ADIOS2/thirdparty/pybind11/include +PyBind11_INC:= ../../thirdparty/pybind11/include CFLAGS:=-c -Wall -fPIC -O0 -g -std=c++11 -Wno-deprecated-declarations diff --git a/bindings/python/helloBPWriter.py b/bindings/python/helloBPWriter.py index f5f90c5ca31d6170a14ba5c2df8b809bb0f72985..fb39e326cba510343378045965080a411c1755d8 100644 --- a/bindings/python/helloBPWriter.py +++ b/bindings/python/helloBPWriter.py @@ -12,15 +12,15 @@ import numpy as np # User data -myArray = np.array([1, 2, 3, 4]) +myArray = np.array([1., 2., 3., 4., 5.]) -print "Read " + str(Read) +print "Read " + str(adiosRead) adios = ADIOS(MPI.COMM_WORLD, True) bpIO = adios.DeclareIO("BPN2N") ioArray = bpIO.DefineVariable("bpArray", [myArray.size], [0], [myArray.size], True) -bpFileWriter = bpIO.Open("myArray.bp", Write) +bpFileWriter = bpIO.Open("myArray.bp", adiosWrite) bpFileWriter.Write(ioArray, myArray) bpFileWriter.Close() diff --git a/bindings/python/source/VariablePy.cpp b/bindings/python/source/VariablePy.cpp index 76813c6cd1431402ff67f38baeac8b8e462cc64f..a8da68e6c1ff6e822a4052fb972a69cdd190d194 100644 --- a/bindings/python/source/VariablePy.cpp +++ b/bindings/python/source/VariablePy.cpp @@ -16,7 +16,7 @@ namespace adios VariablePy::VariablePy(const std::string &name, const pyList shape, const pyList start, const pyList count, const bool isConstantDims, const bool debugMode) -: m_Name(name), m_Shape(shape), m_Start(count), m_Count(count), +: m_Name(name), m_Shape(shape), m_Start(start), m_Count(count), m_IsConstantDims(isConstantDims), m_DebugMode(debugMode) { } diff --git a/bindings/python/source/gluePyBind11.cpp b/bindings/python/source/gluePyBind11.cpp index aaf9033993ced2419c633520b5fd8830579c2381..0c4aa097f026b5b815b4bc4088983dbac1e41782 100644 --- a/bindings/python/source/gluePyBind11.cpp +++ b/bindings/python/source/gluePyBind11.cpp @@ -45,13 +45,13 @@ PYBIND11_PLUGIN(adios2py) } pybind11::module m("adios2py", "ADIOS2 Python bindings using pybind11"); - m.attr("DebugON") = true; - m.attr("DebugOFF") = false; - m.attr("Write") = static_cast<int>(adios::OpenMode::Write); - m.attr("Read") = static_cast<int>(adios::OpenMode::Read); - m.attr("Append") = static_cast<int>(adios::OpenMode::Append); - m.attr("ReadWrite") = static_cast<int>(adios::OpenMode::ReadWrite); - m.def("ADIOS", &ADIOSPyInit, "Function that creates an ADIOS object"); + m.attr("adiosDebugON") = true; + m.attr("adiosDebugOFF") = false; + m.attr("adiosWrite") = static_cast<int>(adios::OpenMode::Write); + m.attr("adiosRead") = static_cast<int>(adios::OpenMode::Read); + m.attr("adiosAppend") = static_cast<int>(adios::OpenMode::Append); + m.attr("adiosReadWrite") = static_cast<int>(adios::OpenMode::ReadWrite); + m.def("ADIOS", &ADIOSPyInit, "Function that creates an ADIOS class object"); pybind11::class_<adios::ADIOSPy>(m, "ADIOSPy") .def("DeclareIO", &adios::ADIOSPy::DeclareIO);