3 #define PY_SSIZE_T_CLEAN 
    4 #ifndef CYTHON_USE_PYLONG_INTERNALS 
    5 #ifdef PYLONG_BITS_IN_DIGIT 
    6 #define CYTHON_USE_PYLONG_INTERNALS 0 
    9 #ifdef PYLONG_BITS_IN_DIGIT 
   10 #define CYTHON_USE_PYLONG_INTERNALS 1 
   12 #define CYTHON_USE_PYLONG_INTERNALS 0 
   18     #error Python headers needed to compile C extensions, please install development version of Python. 
   19 #elif PY_VERSION_HEX < 0x02040000 
   20     #error Cython requires Python 2.4+. 
   22 #define CYTHON_ABI "0_20_2" 
   25 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) 
   27 #if !defined(WIN32) && !defined(MS_WINDOWS) 
   39   #define DL_IMPORT(t) t 
   42   #define DL_EXPORT(t) t 
   45   #define PY_LONG_LONG LONG_LONG 
   48   #define Py_HUGE_VAL HUGE_VAL 
   51 #define CYTHON_COMPILING_IN_PYPY 1 
   52 #define CYTHON_COMPILING_IN_CPYTHON 0 
   54 #define CYTHON_COMPILING_IN_PYPY 0 
   55 #define CYTHON_COMPILING_IN_CPYTHON 1 
   57 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 
   58 #define Py_OptimizeFlag 0 
   60 #if PY_VERSION_HEX < 0x02050000 
   61   typedef int Py_ssize_t;
 
   62   #define PY_SSIZE_T_MAX INT_MAX 
   63   #define PY_SSIZE_T_MIN INT_MIN 
   64   #define PY_FORMAT_SIZE_T "" 
   65   #define CYTHON_FORMAT_SSIZE_T "" 
   66   #define PyInt_FromSsize_t(z) PyInt_FromLong(z) 
   67   #define PyInt_AsSsize_t(o)   __Pyx_PyInt_As_int(o) 
   68   #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ 
   69                                 (PyErr_Format(PyExc_TypeError, \ 
   70                                               "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
 
   72   #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ 
   74   #define PyIndex_Check __Pyx_PyIndex_Check 
   75   #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) 
   76   #define __PYX_BUILD_PY_SSIZE_T "i" 
   78   #define __PYX_BUILD_PY_SSIZE_T "n" 
   79   #define CYTHON_FORMAT_SSIZE_T "z" 
   80   #define __Pyx_PyIndex_Check PyIndex_Check 
   82 #if PY_VERSION_HEX < 0x02060000 
   83   #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) 
   84   #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type) 
   85   #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size) 
   86   #define PyVarObject_HEAD_INIT(type, size) \ 
   87           PyObject_HEAD_INIT(type) size, 
   88   #define PyType_Modified(t) 
   99      Py_ssize_t *suboffsets;
 
  102   #define PyBUF_SIMPLE 0 
  103   #define PyBUF_WRITABLE 0x0001 
  104   #define PyBUF_FORMAT 0x0004 
  105   #define PyBUF_ND 0x0008 
  106   #define PyBUF_STRIDES (0x0010 | PyBUF_ND) 
  107   #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) 
  108   #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) 
  109   #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) 
  110   #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) 
  111   #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) 
  112   #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) 
  113   typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
 
  114   typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
 
  116 #if PY_MAJOR_VERSION < 3 
  117   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" 
  118   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ 
  119           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) 
  120   #define __Pyx_DefaultClassType PyClass_Type 
  122   #define __Pyx_BUILTIN_MODULE_NAME "builtins" 
  123   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ 
  124           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) 
  125   #define __Pyx_DefaultClassType PyType_Type 
  127 #if PY_VERSION_HEX < 0x02060000 
  128   #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
 
  130 #if PY_MAJOR_VERSION >= 3 
  131   #define Py_TPFLAGS_CHECKTYPES 0 
  132   #define Py_TPFLAGS_HAVE_INDEX 0 
  134 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) 
  135   #define Py_TPFLAGS_HAVE_NEWBUFFER 0 
  137 #if PY_VERSION_HEX < 0x02060000 
  138   #define Py_TPFLAGS_HAVE_VERSION_TAG 0 
  140 #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) 
  141   #define Py_TPFLAGS_IS_ABSTRACT 0 
  143 #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) 
  144   #define Py_TPFLAGS_HAVE_FINALIZE 0 
  146 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) 
  147   #define CYTHON_PEP393_ENABLED 1 
  148   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \ 
  149                                               0 : _PyUnicode_Ready((PyObject *)(op))) 
  150   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u) 
  151   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) 
  152   #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u) 
  153   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u) 
  154   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i) 
  156   #define CYTHON_PEP393_ENABLED 0 
  157   #define __Pyx_PyUnicode_READY(op)       (0) 
  158   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u) 
  159   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) 
  160   #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE)) 
  161   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u)) 
  162   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) 
  164 #if CYTHON_COMPILING_IN_PYPY 
  165   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b) 
  166   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b) 
  168   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b) 
  169   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ 
  170       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) 
  172 #define __Pyx_PyString_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) 
  173 #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) 
  174 #if PY_MAJOR_VERSION >= 3 
  175   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b) 
  177   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b) 
  179 #if PY_MAJOR_VERSION >= 3 
  180   #define PyBaseString_Type            PyUnicode_Type 
  181   #define PyStringObject               PyUnicodeObject 
  182   #define PyString_Type                PyUnicode_Type 
  183   #define PyString_Check               PyUnicode_Check 
  184   #define PyString_CheckExact          PyUnicode_CheckExact 
  186 #if PY_VERSION_HEX < 0x02060000 
  187   #define PyBytesObject                PyStringObject 
  188   #define PyBytes_Type                 PyString_Type 
  189   #define PyBytes_Check                PyString_Check 
  190   #define PyBytes_CheckExact           PyString_CheckExact 
  191   #define PyBytes_FromString           PyString_FromString 
  192   #define PyBytes_FromStringAndSize    PyString_FromStringAndSize 
  193   #define PyBytes_FromFormat           PyString_FromFormat 
  194   #define PyBytes_DecodeEscape         PyString_DecodeEscape 
  195   #define PyBytes_AsString             PyString_AsString 
  196   #define PyBytes_AsStringAndSize      PyString_AsStringAndSize 
  197   #define PyBytes_Size                 PyString_Size 
  198   #define PyBytes_AS_STRING            PyString_AS_STRING 
  199   #define PyBytes_GET_SIZE             PyString_GET_SIZE 
  200   #define PyBytes_Repr                 PyString_Repr 
  201   #define PyBytes_Concat               PyString_Concat 
  202   #define PyBytes_ConcatAndDel         PyString_ConcatAndDel 
  204 #if PY_MAJOR_VERSION >= 3 
  205   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) 
  206   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) 
  208   #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ 
  209                                          PyString_Check(obj) || PyUnicode_Check(obj)) 
  210   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) 
  212 #if PY_VERSION_HEX < 0x02060000 
  213   #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type) 
  214   #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type) 
  216 #ifndef PySet_CheckExact 
  217   #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type) 
  219 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) 
  220 #if PY_MAJOR_VERSION >= 3 
  221   #define PyIntObject                  PyLongObject 
  222   #define PyInt_Type                   PyLong_Type 
  223   #define PyInt_Check(op)              PyLong_Check(op) 
  224   #define PyInt_CheckExact(op)         PyLong_CheckExact(op) 
  225   #define PyInt_FromString             PyLong_FromString 
  226   #define PyInt_FromUnicode            PyLong_FromUnicode 
  227   #define PyInt_FromLong               PyLong_FromLong 
  228   #define PyInt_FromSize_t             PyLong_FromSize_t 
  229   #define PyInt_FromSsize_t            PyLong_FromSsize_t 
  230   #define PyInt_AsLong                 PyLong_AsLong 
  231   #define PyInt_AS_LONG                PyLong_AS_LONG 
  232   #define PyInt_AsSsize_t              PyLong_AsSsize_t 
  233   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask 
  234   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask 
  235   #define PyNumber_Int                 PyNumber_Long 
  237 #if PY_MAJOR_VERSION >= 3 
  238   #define PyBoolObject                 PyLongObject 
  240 #if PY_VERSION_HEX < 0x030200A4 
  241   typedef long Py_hash_t;
 
  242   #define __Pyx_PyInt_FromHash_t PyInt_FromLong 
  243   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong 
  245   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t 
  246   #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t 
  248 #if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300) 
  249   #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) 
  250   #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) 
  251   #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) 
  253   #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ 
  254         (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
 
  255         (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
 
  256             (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
 
  257   #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ 
  258         (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
 
  259         (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
 
  260             (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
 
  261   #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ 
  262         (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
 
  263         (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
 
  264             (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
 
  266 #if PY_MAJOR_VERSION >= 3 
  267   #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) 
  269 #if PY_VERSION_HEX < 0x02050000 
  270   #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n))) 
  271   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) 
  272   #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n))) 
  274   #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n)) 
  275   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) 
  276   #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n)) 
  278 #if PY_VERSION_HEX < 0x02050000 
  279   #define __Pyx_NAMESTR(n) ((char *)(n)) 
  280   #define __Pyx_DOCSTR(n)  ((char *)(n)) 
  282   #define __Pyx_NAMESTR(n) (n) 
  283   #define __Pyx_DOCSTR(n)  (n) 
  285 #ifndef CYTHON_INLINE 
  286   #if defined(__GNUC__) 
  287     #define CYTHON_INLINE __inline__ 
  288   #elif defined(_MSC_VER) 
  289     #define CYTHON_INLINE __inline 
  290   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 
  291     #define CYTHON_INLINE inline 
  293     #define CYTHON_INLINE 
  296 #ifndef CYTHON_RESTRICT 
  297   #if defined(__GNUC__) 
  298     #define CYTHON_RESTRICT __restrict__ 
  299   #elif defined(_MSC_VER) && _MSC_VER >= 1400 
  300     #define CYTHON_RESTRICT __restrict 
  301   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 
  302     #define CYTHON_RESTRICT restrict 
  304     #define CYTHON_RESTRICT 
  308 #define __PYX_NAN() ((float) NAN) 
  310 static CYTHON_INLINE 
float __PYX_NAN() {
 
  315   memset(&value, 0xFF, 
sizeof(value));
 
  321 void __Pyx_call_destructor(T* x) {
 
  327 #if PY_MAJOR_VERSION >= 3 
  328   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y) 
  329   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y) 
  331   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y) 
  332   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y) 
  335 #ifndef __PYX_EXTERN_C 
  337     #define __PYX_EXTERN_C extern "C" 
  339     #define __PYX_EXTERN_C extern 
  343 #if defined(WIN32) || defined(MS_WINDOWS) 
  344 #define _USE_MATH_DEFINES 
  347 #define __PYX_HAVE__sioninter 
  348 #define __PYX_HAVE_API__sioninter 
  352 #include "pythread.h" 
  361 #ifdef PYREX_WITHOUT_ASSERTIONS 
  362 #define CYTHON_WITHOUT_ASSERTIONS 
  365 #ifndef CYTHON_UNUSED 
  366 # if defined(__GNUC__) 
  367 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 
  368 #     define CYTHON_UNUSED __attribute__ ((__unused__)) 
  370 #     define CYTHON_UNUSED 
  372 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) 
  373 #   define CYTHON_UNUSED __attribute__ ((__unused__)) 
  375 #   define CYTHON_UNUSED 
  378 typedef struct {PyObject **p; 
char *s; 
const Py_ssize_t n; 
const char* encoding;
 
  379                 const char is_unicode; 
const char is_str; 
const char intern; } __Pyx_StringTabEntry; 
 
  381 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 
  382 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 
  383 #define __PYX_DEFAULT_STRING_ENCODING "" 
  384 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString 
  385 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize 
  386 #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \ 
  387     (sizeof(type) < sizeof(Py_ssize_t))  ||             \ 
  388     (sizeof(type) > sizeof(Py_ssize_t) &&               \ 
  389           likely(v < (type)PY_SSIZE_T_MAX ||            \ 
  390                  v == (type)PY_SSIZE_T_MAX)  &&         \ 
  391           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \ 
  392                                 v == (type)PY_SSIZE_T_MIN)))  ||  \ 
  393     (sizeof(type) == sizeof(Py_ssize_t) &&              \ 
  394           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \ 
  395                                v == (type)PY_SSIZE_T_MAX)))  ) 
  396 static CYTHON_INLINE 
char* __Pyx_PyObject_AsString(PyObject*);
 
  397 static CYTHON_INLINE 
char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
 
  398 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) 
  399 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) 
  400 #define __Pyx_PyBytes_FromString        PyBytes_FromString 
  401 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize 
  402 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char*);
 
  403 #if PY_MAJOR_VERSION < 3 
  404     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString 
  405     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize 
  407     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString 
  408     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize 
  410 #define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s)) 
  411 #define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s)) 
  412 #define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((const char*)s) 
  413 #define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((const char*)s) 
  414 #define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((const char*)s) 
  415 #define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((const char*)s) 
  416 #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((const char*)s) 
  417 #if PY_MAJOR_VERSION < 3 
  418 static CYTHON_INLINE 
size_t __Pyx_Py_UNICODE_strlen(
const Py_UNICODE *u)
 
  420     const Py_UNICODE *u_end = u;
 
  422     return (
size_t)(u_end - u - 1);
 
  425 #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen 
  427 #define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) 
  428 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode 
  429 #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode 
  430 #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) 
  431 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) 
  432 static CYTHON_INLINE 
int __Pyx_PyObject_IsTrue(PyObject*);
 
  433 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
 
  434 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
 
  435 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t);
 
  436 #if CYTHON_COMPILING_IN_CPYTHON 
  437 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) 
  439 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) 
  441 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) 
  442 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 
  443 static int __Pyx_sys_getdefaultencoding_not_ascii;
 
  444 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
 
  446     PyObject* default_encoding = NULL;
 
  447     PyObject* ascii_chars_u = NULL;
 
  448     PyObject* ascii_chars_b = NULL;
 
  449     const char* default_encoding_c;
 
  450     sys = PyImport_ImportModule(
"sys");
 
  452     default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*) 
"getdefaultencoding", NULL);
 
  454     if (!default_encoding) 
goto bad;
 
  455     default_encoding_c = PyBytes_AsString(default_encoding);
 
  456     if (!default_encoding_c) 
goto bad;
 
  457     if (strcmp(default_encoding_c, 
"ascii") == 0) {
 
  458         __Pyx_sys_getdefaultencoding_not_ascii = 0;
 
  460         char ascii_chars[128];
 
  462         for (c = 0; c < 128; c++) {
 
  465         __Pyx_sys_getdefaultencoding_not_ascii = 1;
 
  466         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
 
  467         if (!ascii_chars_u) 
goto bad;
 
  468         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
 
  469         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
 
  472                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
 
  476         Py_DECREF(ascii_chars_u);
 
  477         Py_DECREF(ascii_chars_b);
 
  479     Py_DECREF(default_encoding);
 
  482     Py_XDECREF(default_encoding);
 
  483     Py_XDECREF(ascii_chars_u);
 
  484     Py_XDECREF(ascii_chars_b);
 
  488 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 
  489 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) 
  491 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) 
  492 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 
  493 static char* __PYX_DEFAULT_STRING_ENCODING;
 
  494 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
 
  496     PyObject* default_encoding = NULL;
 
  497     char* default_encoding_c;
 
  498     sys = PyImport_ImportModule(
"sys");
 
  500     default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*) 
"getdefaultencoding", NULL);
 
  502     if (!default_encoding) 
goto bad;
 
  503     default_encoding_c = PyBytes_AsString(default_encoding);
 
  504     if (!default_encoding_c) 
goto bad;
 
  505     __PYX_DEFAULT_STRING_ENCODING = (
char*) malloc(strlen(default_encoding_c));
 
  506     if (!__PYX_DEFAULT_STRING_ENCODING) 
goto bad;
 
  507     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
 
  508     Py_DECREF(default_encoding);
 
  511     Py_XDECREF(default_encoding);
 
  519 #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) 
  520   #define likely(x)   __builtin_expect(!!(x), 1) 
  521   #define unlikely(x) __builtin_expect(!!(x), 0) 
  523   #define likely(x)   (x) 
  524   #define unlikely(x) (x) 
  527 static PyObject *__pyx_m;
 
  528 static PyObject *__pyx_d;
 
  529 static PyObject *__pyx_b;
 
  530 static PyObject *__pyx_empty_tuple;
 
  531 static PyObject *__pyx_empty_bytes;
 
  532 static int __pyx_lineno;
 
  533 static int __pyx_clineno = 0;
 
  534 static const char * __pyx_cfilenm= __FILE__;
 
  535 static const char *__pyx_filename;
 
  538 static const char *__pyx_f[] = {
 
  553 typedef PY_LONG_LONG __pyx_t_10csioninter_sion_int64;
 
  562 typedef int __pyx_t_10csioninter_sion_int32;
 
  565 #ifndef _ARRAYARRAY_H 
  567 typedef struct arrayobject arrayobject;
 
  569 struct __pyx_opt_args_9sioninter_sion_open;
 
  570 struct __pyx_opt_args_9sioninter_sion_paropen_mpi;
 
  571 struct __pyx_opt_args_9sioninter_sion_fread;
 
  572 struct __pyx_opt_args_9sioninter_sion_fread_key;
 
  573 struct __pyx_defaults;
 
  574 typedef struct __pyx_defaults __pyx_defaults;
 
  575 struct __pyx_defaults1;
 
  576 typedef struct __pyx_defaults1 __pyx_defaults1;
 
  577 struct __pyx_defaults2;
 
  578 typedef struct __pyx_defaults2 __pyx_defaults2;
 
  587 struct __pyx_opt_args_9sioninter_sion_open {
 
  591   PyObject *chunksizes;
 
  593   PyObject *globalranks;
 
  604 struct __pyx_opt_args_9sioninter_sion_paropen_mpi {
 
  611   PyObject *globalrank;
 
  622 struct __pyx_opt_args_9sioninter_sion_fread {
 
  634 struct __pyx_opt_args_9sioninter_sion_fread_key {
 
  638 struct __pyx_defaults {
 
  639   PyObject *__pyx_arg_par_mode;
 
  641 struct __pyx_defaults1 {
 
  642   PyObject *__pyx_arg_nitems;
 
  644 struct __pyx_defaults2 {
 
  645   PyObject *__pyx_arg_nitems;
 
  647 #ifndef CYTHON_REFNANNY 
  648   #define CYTHON_REFNANNY 0 
  652     void (*INCREF)(
void*, PyObject*, int);
 
  653     void (*DECREF)(
void*, PyObject*, int);
 
  654     void (*GOTREF)(
void*, PyObject*, int);
 
  655     void (*GIVEREF)(
void*, PyObject*, int);
 
  656     void* (*SetupContext)(
const char*, int, 
const char*);
 
  657     void (*FinishContext)(
void**);
 
  658   } __Pyx_RefNannyAPIStruct;
 
  659   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
 
  660   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname); 
 
  661   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; 
  663   #define __Pyx_RefNannySetupContext(name, acquire_gil) \ 
  665               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \ 
  666               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ 
  667               PyGILState_Release(__pyx_gilstate_save); \ 
  669               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ 
  672   #define __Pyx_RefNannySetupContext(name, acquire_gil) \ 
  673           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) 
  675   #define __Pyx_RefNannyFinishContext() \ 
  676           __Pyx_RefNanny->FinishContext(&__pyx_refnanny) 
  677   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 
  678   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 
  679   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 
  680   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 
  681   #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) 
  682   #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) 
  683   #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) 
  684   #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) 
  686   #define __Pyx_RefNannyDeclarations 
  687   #define __Pyx_RefNannySetupContext(name, acquire_gil) 
  688   #define __Pyx_RefNannyFinishContext() 
  689   #define __Pyx_INCREF(r) Py_INCREF(r) 
  690   #define __Pyx_DECREF(r) Py_DECREF(r) 
  691   #define __Pyx_GOTREF(r) 
  692   #define __Pyx_GIVEREF(r) 
  693   #define __Pyx_XINCREF(r) Py_XINCREF(r) 
  694   #define __Pyx_XDECREF(r) Py_XDECREF(r) 
  695   #define __Pyx_XGOTREF(r) 
  696   #define __Pyx_XGIVEREF(r) 
  698 #define __Pyx_XDECREF_SET(r, v) do {                            \ 
  699         PyObject *tmp = (PyObject *) r;                         \ 
  700         r = v; __Pyx_XDECREF(tmp);                              \ 
  702 #define __Pyx_DECREF_SET(r, v) do {                             \ 
  703         PyObject *tmp = (PyObject *) r;                         \ 
  704         r = v; __Pyx_DECREF(tmp);                               \ 
  706 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) 
  707 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) 
  709 #if CYTHON_COMPILING_IN_CPYTHON 
  710 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
 
  711     PyTypeObject* tp = Py_TYPE(obj);
 
  712     if (likely(tp->tp_getattro))
 
  713         return tp->tp_getattro(obj, attr_name);
 
  714 #if PY_MAJOR_VERSION < 3 
  715     if (likely(tp->tp_getattr))
 
  716         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
 
  718     return PyObject_GetAttr(obj, attr_name);
 
  721 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) 
  724 static PyObject *__Pyx_GetBuiltinName(PyObject *name); 
 
  726 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name); 
 
  728 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
 
  729     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
 
  730     const char* function_name); 
 
  732 static void __Pyx_RaiseArgtupleInvalid(
const char* func_name, 
int exact,
 
  733     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); 
 
  735 #if CYTHON_COMPILING_IN_CPYTHON 
  736 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) 
  737 static CYTHON_INLINE 
int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
 
  738     PyTypeObject* tp = Py_TYPE(obj);
 
  739     if (likely(tp->tp_setattro))
 
  740         return tp->tp_setattro(obj, attr_name, value);
 
  741 #if PY_MAJOR_VERSION < 3 
  742     if (likely(tp->tp_setattr))
 
  743         return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
 
  745     return PyObject_SetAttr(obj, attr_name, value);
 
  748 #define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n) 
  749 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) 
  752 static CYTHON_INLINE 
int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, 
int eq) {
 
  753     int result = PySequence_Contains(seq, item);
 
  754     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
 
  757 #if CYTHON_COMPILING_IN_CPYTHON 
  758 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); 
 
  760 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) 
  763 static CYTHON_INLINE 
void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); 
 
  764 static CYTHON_INLINE 
void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); 
 
  766 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); 
 
  770 static CYTHON_INLINE 
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, 
int equals); 
 
  772 static CYTHON_INLINE 
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, 
int equals); 
 
  774 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); 
 
  776 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); 
 
  778 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
 
  780 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
 
  782 #define __Pyx_CyFunction_USED 1 
  783 #include <structmember.h> 
  784 #define __Pyx_CYFUNCTION_STATICMETHOD  0x01 
  785 #define __Pyx_CYFUNCTION_CLASSMETHOD   0x02 
  786 #define __Pyx_CYFUNCTION_CCLASS        0x04 
  787 #define __Pyx_CyFunction_GetClosure(f) \ 
  788     (((__pyx_CyFunctionObject *) (f))->func_closure) 
  789 #define __Pyx_CyFunction_GetClassObj(f) \ 
  790     (((__pyx_CyFunctionObject *) (f))->func_classobj) 
  791 #define __Pyx_CyFunction_Defaults(type, f) \ 
  792     ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) 
  793 #define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ 
  794     ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) 
  796     PyCFunctionObject func;
 
  798     PyObject *func_weakreflist;
 
  800     PyObject *func_qualname;
 
  802     PyObject *func_globals;
 
  804     PyObject *func_closure;
 
  805     PyObject *func_classobj; 
 
  807     int defaults_pyobjects;
 
  809     PyObject *defaults_tuple;   
 
  810     PyObject *defaults_kwdict;  
 
  811     PyObject *(*defaults_getter)(PyObject *);
 
  812     PyObject *func_annotations; 
 
  813 } __pyx_CyFunctionObject;
 
  814 static PyTypeObject *__pyx_CyFunctionType = 0;
 
  815 #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \ 
  816     __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) 
  817 static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
 
  818                                       int flags, PyObject* qualname,
 
  820                                       PyObject *module, PyObject *globals,
 
  822 static CYTHON_INLINE 
void *__Pyx_CyFunction_InitDefaults(PyObject *m,
 
  825 static CYTHON_INLINE 
void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
 
  827 static CYTHON_INLINE 
void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
 
  829 static CYTHON_INLINE 
void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
 
  831 static int __Pyx_CyFunction_init(
void);
 
  833 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
 
  834                                            PyObject *mkw, PyObject *modname, PyObject *doc); 
 
  835 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
 
  836                                       PyObject *mkw, 
int calculate_metaclass, 
int allow_py2_metaclass); 
 
  838 #ifndef _ARRAYARRAY_H 
  839 #define _ARRAYARRAY_H 
  840 typedef struct arraydescr {
 
  843     PyObject * (*getitem)(
struct arrayobject *, Py_ssize_t);
 
  844     int (*setitem)(
struct arrayobject *, Py_ssize_t, PyObject *);
 
  845 #if PY_VERSION_HEX >= 0x03000000 
  857         unsigned int *as_uints;
 
  858         unsigned char *as_uchars;
 
  859         signed char *as_schars;
 
  861         unsigned long *as_ulongs;
 
  864         unsigned short *as_ushorts;
 
  865         Py_UNICODE *as_pyunicodes;
 
  868     Py_ssize_t allocated;
 
  869     struct arraydescr *ob_descr;
 
  870     PyObject *weakreflist; 
 
  871 #if PY_VERSION_HEX >= 0x03000000 
  875 #ifndef NO_NEWARRAY_INLINE 
  876 static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size,
 
  877     struct arraydescr *descr) {
 
  881         PyErr_BadInternalCall();
 
  884     nbytes = size * descr->itemsize;
 
  885     if (nbytes / descr->itemsize != (
size_t)size) {
 
  886         return PyErr_NoMemory();
 
  888     op = (arrayobject *) type->tp_alloc(type, 0);
 
  892     op->ob_descr = descr;
 
  893     op->allocated = size;
 
  894     op->weakreflist = NULL;
 
  897         op->data.ob_item = NULL;
 
  900         op->data.ob_item = PyMem_NEW(
char, nbytes);
 
  901         if (op->data.ob_item == NULL) {
 
  903             return PyErr_NoMemory();
 
  906     return (PyObject *) op;
 
  909 PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size,
 
  910     struct arraydescr *descr);
 
  912 static CYTHON_INLINE 
int resize(arrayobject *
self, Py_ssize_t n) {
 
  913     void *items = (
void*) self->data.ob_item;
 
  914     PyMem_Resize(items, 
char, (
size_t)(n * 
self->ob_descr->itemsize));
 
  919     self->data.ob_item = (
char*) items;
 
  924 static CYTHON_INLINE 
int resize_smart(arrayobject *
self, Py_ssize_t n) {
 
  925     void *items = (
void*) self->data.ob_item;
 
  927     if (n < self->allocated) {
 
  928         if (n*4 > self->allocated) {
 
  933     newsize = n  * 3 / 2 + 1;
 
  934     PyMem_Resize(items, 
char, (
size_t)(newsize * self->ob_descr->itemsize));
 
  939     self->data.ob_item = (
char*) items;
 
  941     self->allocated = newsize;
 
  946 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, 
int level); 
 
  948 static CYTHON_INLINE 
int __Pyx_PyInt_As_int(PyObject *);
 
  950 static CYTHON_INLINE 
long __Pyx_PyInt_As_long(PyObject *);
 
  952 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *);
 
  954 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value);
 
  956 static CYTHON_INLINE 
size_t __Pyx_PyInt_As_size_t(PyObject *);
 
  958 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value);
 
  960 static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);
 
  962 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value);
 
  964 static int __Pyx_check_binary_version(
void);
 
  966 #if !defined(__Pyx_PyIdentifier_FromString) 
  967 #if PY_MAJOR_VERSION < 3 
  968   #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) 
  970   #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) 
  974 static PyObject *__Pyx_ImportModule(
const char *name); 
 
  976 static PyTypeObject *__Pyx_ImportType(
const char *module_name, 
const char *class_name, 
size_t size, 
int strict);  
 
  980     PyCodeObject* code_object;
 
  981 } __Pyx_CodeObjectCacheEntry;
 
  982 struct __Pyx_CodeObjectCache {
 
  985     __Pyx_CodeObjectCacheEntry* entries;
 
  987 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
 
  988 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, 
int count, 
int code_line);
 
  989 static PyCodeObject *__pyx_find_code_object(
int code_line);
 
  990 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object);
 
  992 static void __Pyx_AddTraceback(
const char *funcname, 
int c_line,
 
  993                                int py_line, 
const char *filename); 
 
  995 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); 
 
 1029 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
 
 1038 static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
 
 1047 static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
 
 1086 static PyTypeObject *__pyx_ptype_7cpython_5array_array = 0;
 
 1087 static CYTHON_INLINE 
int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, 
char *, Py_ssize_t); 
 
 1098 static PyObject *__pyx_f_9sioninter_sion_open(PyObject *, PyObject *, 
struct __pyx_opt_args_9sioninter_sion_open *__pyx_optional_args); 
 
 1099 static PyObject *__pyx_f_9sioninter_sion_close(PyObject *); 
 
 1100 static PyObject *__pyx_f_9sioninter_sion_paropen_mpi(PyObject *, PyObject *, 
struct __pyx_opt_args_9sioninter_sion_paropen_mpi *__pyx_optional_args); 
 
 1101 static PyObject *__pyx_f_9sioninter_sion_parclose_mpi(PyObject *); 
 
 1102 static PyObject *__pyx_f_9sioninter_sion_fwrite(PyObject *, PyObject *); 
 
 1103 static PyObject *__pyx_f_9sioninter_sion_fread(PyObject *, 
struct __pyx_opt_args_9sioninter_sion_fread *__pyx_optional_args); 
 
 1104 static PyObject *__pyx_f_9sioninter_sion_bytes_avail_in_chunk(PyObject *); 
 
 1105 static PyObject *__pyx_f_9sioninter_sion_fwrite_key(PyObject *, PyObject *, PyObject *, 
int __pyx_skip_dispatch); 
 
 1106 static PyObject *__pyx_f_9sioninter_sion_fread_key(PyObject *, PyObject *, 
int __pyx_skip_dispatch, 
struct __pyx_opt_args_9sioninter_sion_fread_key *__pyx_optional_args); 
 
 1107 #define __Pyx_MODULE_NAME "sioninter" 
 1108 int __pyx_module_is_main_sioninter = 0;
 
 1111 static PyObject *__pyx_builtin_property;
 
 1112 static PyObject *__pyx_builtin_AttributeError;
 
 1113 static PyObject *__pyx_builtin_range;
 
 1114 static PyObject *__pyx_builtin_IOError;
 
 1115 static PyObject *__pyx_builtin_MemoryError;
 
 1116 static PyObject *__pyx_pf_9sioninter_8SIONFile_16__defaults__(CYTHON_UNUSED PyObject *__pyx_self); 
 
 1117 static PyObject *__pyx_pf_9sioninter_8SIONFile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_par_mode); 
 
 1118 static PyObject *__pyx_pf_9sioninter_8SIONFile_2open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fname, PyObject *__pyx_v_file_mode); 
 
 1119 static PyObject *__pyx_pf_9sioninter_8SIONFile_4closed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); 
 
 1120 static PyObject *__pyx_pf_9sioninter_8SIONFile_6close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); 
 
 1121 static PyObject *__pyx_pf_9sioninter_8SIONFile_8write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data); 
 
 1122 static PyObject *__pyx_pf_9sioninter_8SIONFile_18__defaults__(CYTHON_UNUSED PyObject *__pyx_self); 
 
 1123 static PyObject *__pyx_pf_9sioninter_8SIONFile_10read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_nitems); 
 
 1124 static PyObject *__pyx_pf_9sioninter_8SIONFile_12write_key(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_key); 
 
 1125 static PyObject *__pyx_pf_9sioninter_8SIONFile_20__defaults__(CYTHON_UNUSED PyObject *__pyx_self); 
 
 1126 static PyObject *__pyx_pf_9sioninter_8SIONFile_14read_key(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_nitems); 
 
 1127 static PyObject *__pyx_pf_9sioninter_open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fname, PyObject *__pyx_v_file_mode, PyObject *__pyx_v_par_mode); 
 
 1128 static PyObject *__pyx_pf_9sioninter_2sion_fwrite_key(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_key, PyObject *__pyx_v_sid); 
 
 1129 static PyObject *__pyx_pf_9sioninter_4sion_fread_key(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_key, PyObject *__pyx_v_sid, PyObject *__pyx_v_nitems); 
 
 1130 static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED 
int __pyx_v_flags); 
 
 1131 static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); 
 
 1132 static char __pyx_k_[] = 
"";
 
 1133 static char __pyx_k_io[] = 
"io";
 
 1134 static char __pyx_k_MPI[] = 
"MPI";
 
 1135 static char __pyx_k_doc[] = 
"__doc__";
 
 1136 static char __pyx_k_key[] = 
"key";
 
 1137 static char __pyx_k_mpi[] = 
"mpi";
 
 1138 static char __pyx_k_ret[] = 
"ret";
 
 1139 static char __pyx_k_sid[] = 
"_sid";
 
 1140 static char __pyx_k_data[] = 
"data";
 
 1141 static char __pyx_k_init[] = 
"__init__";
 
 1142 static char __pyx_k_main[] = 
"__main__";
 
 1143 static char __pyx_k_open[] = 
"open";
 
 1144 static char __pyx_k_read[] = 
"read";
 
 1145 static char __pyx_k_self[] = 
"self";
 
 1146 static char __pyx_k_test[] = 
"__test__";
 
 1147 static char __pyx_k_array[] = 
"array";
 
 1148 static char __pyx_k_close[] = 
"close";
 
 1149 static char __pyx_k_fname[] = 
"_fname";
 
 1150 static char __pyx_k_range[] = 
"range";
 
 1151 static char __pyx_k_sid_2[] = 
"sid";
 
 1152 static char __pyx_k_write[] = 
"write";
 
 1153 static char __pyx_k_closed[] = 
"closed";
 
 1154 static char __pyx_k_encode[] = 
"encode";
 
 1155 static char __pyx_k_format[] = 
"format";
 
 1156 static char __pyx_k_import[] = 
"__import__";
 
 1157 static char __pyx_k_module[] = 
"__module__";
 
 1158 static char __pyx_k_mpi4py[] = 
"mpi4py";
 
 1159 static char __pyx_k_nitems[] = 
"nitems";
 
 1160 static char __pyx_k_serial[] = 
"serial";
 
 1161 static char __pyx_k_IOError[] = 
"IOError";
 
 1162 static char __pyx_k_fname_2[] = 
"fname";
 
 1163 static char __pyx_k_prepare[] = 
"__prepare__";
 
 1164 static char __pyx_k_Get_rank[] = 
"Get_rank";
 
 1165 static char __pyx_k_SIONFile[] = 
"SIONFile";
 
 1166 static char __pyx_k_par_mode[] = 
"par_mode";
 
 1167 static char __pyx_k_property[] = 
"property";
 
 1168 static char __pyx_k_qualname[] = 
"__qualname__";
 
 1169 static char __pyx_k_read_key[] = 
"read_key";
 
 1170 static char __pyx_k_sionfile[] = 
"sionfile";
 
 1171 static char __pyx_k_file_mode[] = 
"_file_mode";
 
 1172 static char __pyx_k_metaclass[] = 
"__metaclass__";
 
 1173 static char __pyx_k_sioninter[] = 
"sioninter";
 
 1174 static char __pyx_k_write_key[] = 
"write_key";
 
 1175 static char __pyx_k_COMM_WORLD[] = 
"COMM_WORLD";
 
 1176 static char __pyx_k_par_mode_2[] = 
"_par_mode";
 
 1177 static char __pyx_k_MemoryError[] = 
"MemoryError";
 
 1178 static char __pyx_k_file_mode_2[] = 
"file_mode";
 
 1179 static char __pyx_k_DEFAULT_SIZE[] = 
"DEFAULT_SIZE";
 
 1180 static char __pyx_k_DEFAULT_GCOMM[] = 
"DEFAULT_GCOMM";
 
 1181 static char __pyx_k_DEFAULT_LCOMM[] = 
"DEFAULT_LCOMM";
 
 1182 static char __pyx_k_SIONFile_open[] = 
"SIONFile.open";
 
 1183 static char __pyx_k_SIONFile_read[] = 
"SIONFile.read";
 
 1184 static char __pyx_k_AttributeError[] = 
"AttributeError";
 
 1185 static char __pyx_k_BufferedIOBase[] = 
"BufferedIOBase";
 
 1186 static char __pyx_k_DEFAULT_NFILES[] = 
"DEFAULT_NFILES";
 
 1187 static char __pyx_k_DEFAULT_NITEMS[] = 
"DEFAULT_NITEMS";
 
 1188 static char __pyx_k_DEFAULT_NTASKS[] = 
"DEFAULT_NTASKS";
 
 1189 static char __pyx_k_SIONFile_close[] = 
"SIONFile.close";
 
 1190 static char __pyx_k_SIONFile_write[] = 
"SIONFile.write";
 
 1191 static char __pyx_k_DEFAULT_FILEPTR[] = 
"DEFAULT_FILEPTR";
 
 1192 static char __pyx_k_SIONFile___init[] = 
"SIONFile.__init__";
 
 1193 static char __pyx_k_SIONFile_closed[] = 
"SIONFile.closed";
 
 1194 static char __pyx_k_valid_par_modes[] = 
"valid_par_modes";
 
 1195 static char __pyx_k_DEFAULT_PAR_MODE[] = 
"DEFAULT_PAR_MODE";
 
 1196 static char __pyx_k_DEFAULT_CHUNKSIZE[] = 
"DEFAULT_CHUNKSIZE";
 
 1197 static char __pyx_k_DEFAULT_FSBLKSIZE[] = 
"DEFAULT_FSBLKSIZE";
 
 1198 static char __pyx_k_SIONFile_read_key[] = 
"SIONFile.read_key";
 
 1199 static char __pyx_k_DEFAULT_CHUNKSIZES[] = 
"DEFAULT_CHUNKSIZES";
 
 1200 static char __pyx_k_DEFAULT_GLOBALRANK[] = 
"DEFAULT_GLOBALRANK";
 
 1201 static char __pyx_k_SIONFile_write_key[] = 
"SIONFile.write_key";
 
 1202 static char __pyx_k_DEFAULT_GLOBALRANKS[] = 
"DEFAULT_GLOBALRANKS";
 
 1203 static char __pyx_k_read_not_successful[] = 
"read not successful";
 
 1204 static char __pyx_k_read_not_successful_2[] = 
"read not successful: {} {} {}";
 
 1205 static char __pyx_k_home_thust_src_sionlib_pythonin[] = 
"/home/thust/src/sionlib-pythoninterface/sioninter.pyx";
 
 1206 static char __pyx_k_File_like_object_for_handling_SI[] = 
"File-like object for handling SIONlib files";
 
 1207 static char __pyx_k_Interface_for_SIONlib_This_inter[] = 
"Interface for SIONlib\n\nThis interface wrapps access to SIONlib files for access in Python.\n";
 
 1208 static char __pyx_k_invalid_attribute_self__par_mode[] = 
"invalid attribute self._par_mode = {}";
 
 1209 static PyObject *__pyx_kp_u_;
 
 1210 static PyObject *__pyx_n_s_AttributeError;
 
 1211 static PyObject *__pyx_n_s_BufferedIOBase;
 
 1212 static PyObject *__pyx_n_s_COMM_WORLD;
 
 1213 static PyObject *__pyx_n_s_DEFAULT_CHUNKSIZE;
 
 1214 static PyObject *__pyx_n_s_DEFAULT_CHUNKSIZES;
 
 1215 static PyObject *__pyx_n_s_DEFAULT_FILEPTR;
 
 1216 static PyObject *__pyx_n_s_DEFAULT_FSBLKSIZE;
 
 1217 static PyObject *__pyx_n_s_DEFAULT_GCOMM;
 
 1218 static PyObject *__pyx_n_s_DEFAULT_GLOBALRANK;
 
 1219 static PyObject *__pyx_n_s_DEFAULT_GLOBALRANKS;
 
 1220 static PyObject *__pyx_n_s_DEFAULT_LCOMM;
 
 1221 static PyObject *__pyx_n_s_DEFAULT_NFILES;
 
 1222 static PyObject *__pyx_n_s_DEFAULT_NITEMS;
 
 1223 static PyObject *__pyx_n_s_DEFAULT_NTASKS;
 
 1224 static PyObject *__pyx_n_s_DEFAULT_PAR_MODE;
 
 1225 static PyObject *__pyx_n_s_DEFAULT_SIZE;
 
 1226 static PyObject *__pyx_kp_s_File_like_object_for_handling_SI;
 
 1227 static PyObject *__pyx_n_s_Get_rank;
 
 1228 static PyObject *__pyx_n_s_IOError;
 
 1229 static PyObject *__pyx_n_s_MPI;
 
 1230 static PyObject *__pyx_n_s_MemoryError;
 
 1231 static PyObject *__pyx_n_s_SIONFile;
 
 1232 static PyObject *__pyx_n_s_SIONFile___init;
 
 1233 static PyObject *__pyx_n_s_SIONFile_close;
 
 1234 static PyObject *__pyx_n_s_SIONFile_closed;
 
 1235 static PyObject *__pyx_n_s_SIONFile_open;
 
 1236 static PyObject *__pyx_n_s_SIONFile_read;
 
 1237 static PyObject *__pyx_n_s_SIONFile_read_key;
 
 1238 static PyObject *__pyx_n_s_SIONFile_write;
 
 1239 static PyObject *__pyx_n_s_SIONFile_write_key;
 
 1240 static PyObject *__pyx_n_s_array;
 
 1241 static PyObject *__pyx_n_s_close;
 
 1242 static PyObject *__pyx_n_s_closed;
 
 1243 static PyObject *__pyx_n_s_data;
 
 1244 static PyObject *__pyx_n_s_doc;
 
 1245 static PyObject *__pyx_n_s_encode;
 
 1246 static PyObject *__pyx_n_s_file_mode;
 
 1247 static PyObject *__pyx_n_s_file_mode_2;
 
 1248 static PyObject *__pyx_n_s_fname;
 
 1249 static PyObject *__pyx_n_s_fname_2;
 
 1250 static PyObject *__pyx_n_s_format;
 
 1251 static PyObject *__pyx_kp_s_home_thust_src_sionlib_pythonin;
 
 1252 static PyObject *__pyx_n_s_import;
 
 1253 static PyObject *__pyx_n_s_init;
 
 1254 static PyObject *__pyx_kp_u_invalid_attribute_self__par_mode;
 
 1255 static PyObject *__pyx_n_s_io;
 
 1256 static PyObject *__pyx_n_s_key;
 
 1257 static PyObject *__pyx_n_s_main;
 
 1258 static PyObject *__pyx_n_s_metaclass;
 
 1259 static PyObject *__pyx_n_s_module;
 
 1260 static PyObject *__pyx_n_u_mpi;
 
 1261 static PyObject *__pyx_n_s_mpi4py;
 
 1262 static PyObject *__pyx_n_s_nitems;
 
 1263 static PyObject *__pyx_n_s_open;
 
 1264 static PyObject *__pyx_n_s_par_mode;
 
 1265 static PyObject *__pyx_n_s_par_mode_2;
 
 1266 static PyObject *__pyx_n_s_prepare;
 
 1267 static PyObject *__pyx_n_s_property;
 
 1268 static PyObject *__pyx_n_s_qualname;
 
 1269 static PyObject *__pyx_n_s_range;
 
 1270 static PyObject *__pyx_n_s_read;
 
 1271 static PyObject *__pyx_n_s_read_key;
 
 1272 static PyObject *__pyx_kp_u_read_not_successful;
 
 1273 static PyObject *__pyx_kp_u_read_not_successful_2;
 
 1274 static PyObject *__pyx_n_s_ret;
 
 1275 static PyObject *__pyx_n_s_self;
 
 1276 static PyObject *__pyx_n_u_serial;
 
 1277 static PyObject *__pyx_n_s_sid;
 
 1278 static PyObject *__pyx_n_s_sid_2;
 
 1279 static PyObject *__pyx_n_s_sionfile;
 
 1280 static PyObject *__pyx_n_s_sioninter;
 
 1281 static PyObject *__pyx_n_s_test;
 
 1282 static PyObject *__pyx_n_s_valid_par_modes;
 
 1283 static PyObject *__pyx_n_s_write;
 
 1284 static PyObject *__pyx_n_s_write_key;
 
 1285 static PyObject *__pyx_int_0;
 
 1286 static PyObject *__pyx_int_1;
 
 1287 static PyObject *__pyx_int_32;
 
 1288 static PyObject *__pyx_int_neg_1;
 
 1289 static PyObject *__pyx_k__2;
 
 1290 static PyObject *__pyx_k__3;
 
 1291 static PyObject *__pyx_k__4;
 
 1292 static PyObject *__pyx_k__5;
 
 1293 static PyObject *__pyx_k__6;
 
 1294 static PyObject *__pyx_k__7;
 
 1295 static PyObject *__pyx_k__8;
 
 1296 static PyObject *__pyx_k__9;
 
 1297 static PyObject *__pyx_k__10;
 
 1298 static PyObject *__pyx_k__12;
 
 1299 static PyObject *__pyx_k__32;
 
 1300 static PyObject *__pyx_k__33;
 
 1301 static PyObject *__pyx_k__34;
 
 1302 static PyObject *__pyx_k__35;
 
 1303 static PyObject *__pyx_k__36;
 
 1304 static PyObject *__pyx_k__37;
 
 1305 static PyObject *__pyx_tuple__11;
 
 1306 static PyObject *__pyx_tuple__13;
 
 1307 static PyObject *__pyx_tuple__14;
 
 1308 static PyObject *__pyx_tuple__16;
 
 1309 static PyObject *__pyx_tuple__18;
 
 1310 static PyObject *__pyx_tuple__20;
 
 1311 static PyObject *__pyx_tuple__22;
 
 1312 static PyObject *__pyx_tuple__24;
 
 1313 static PyObject *__pyx_tuple__26;
 
 1314 static PyObject *__pyx_tuple__28;
 
 1315 static PyObject *__pyx_tuple__30;
 
 1316 static PyObject *__pyx_codeobj__15;
 
 1317 static PyObject *__pyx_codeobj__17;
 
 1318 static PyObject *__pyx_codeobj__19;
 
 1319 static PyObject *__pyx_codeobj__21;
 
 1320 static PyObject *__pyx_codeobj__23;
 
 1321 static PyObject *__pyx_codeobj__25;
 
 1322 static PyObject *__pyx_codeobj__27;
 
 1323 static PyObject *__pyx_codeobj__29;
 
 1324 static PyObject *__pyx_codeobj__31;
 
 1334 static PyObject *__pyx_pf_9sioninter_8SIONFile_16__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
 
 1335   PyObject *__pyx_r = NULL;
 
 1336   __Pyx_RefNannyDeclarations
 
 1337   PyObject *__pyx_t_1 = NULL;
 
 1338   PyObject *__pyx_t_2 = NULL;
 
 1339   int __pyx_lineno = 0;
 
 1340   const char *__pyx_filename = NULL;
 
 1341   int __pyx_clineno = 0;
 
 1342   __Pyx_RefNannySetupContext(
"__defaults__", 0);
 
 1343   __Pyx_XDECREF(__pyx_r);
 
 1344   __pyx_t_1 = PyTuple_New(1); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1345   __Pyx_GOTREF(__pyx_t_1);
 
 1346   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_par_mode);
 
 1347   PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_par_mode);
 
 1348   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_par_mode);
 
 1349   __pyx_t_2 = PyTuple_New(2); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1350   __Pyx_GOTREF(__pyx_t_2);
 
 1351   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
 
 1352   __Pyx_GIVEREF(__pyx_t_1);
 
 1353   __Pyx_INCREF(Py_None);
 
 1354   PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
 
 1355   __Pyx_GIVEREF(Py_None);
 
 1357   __pyx_r = __pyx_t_2;
 
 1363   __Pyx_XDECREF(__pyx_t_1);
 
 1364   __Pyx_XDECREF(__pyx_t_2);
 
 1365   __Pyx_AddTraceback(
"sioninter.SIONFile.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 1368   __Pyx_XGIVEREF(__pyx_r);
 
 1369   __Pyx_RefNannyFinishContext();
 
 1374 static PyObject *__pyx_pw_9sioninter_8SIONFile_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); 
 
 1375 static PyMethodDef __pyx_mdef_9sioninter_8SIONFile_1__init__ = {__Pyx_NAMESTR(
"__init__"), (PyCFunction)__pyx_pw_9sioninter_8SIONFile_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
 
 1376 static PyObject *__pyx_pw_9sioninter_8SIONFile_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
 1377   PyObject *__pyx_v_self = 0;
 
 1378   PyObject *__pyx_v_par_mode = 0;
 
 1379   int __pyx_lineno = 0;
 
 1380   const char *__pyx_filename = NULL;
 
 1381   int __pyx_clineno = 0;
 
 1382   PyObject *__pyx_r = 0;
 
 1383   __Pyx_RefNannyDeclarations
 
 1384   __Pyx_RefNannySetupContext(
"__init__ (wrapper)", 0);
 
 1386     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_par_mode,0};
 
 1387     PyObject* values[2] = {0,0};
 
 1388     __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
 
 1389     values[1] = __pyx_dynamic_args->__pyx_arg_par_mode;
 
 1390     if (unlikely(__pyx_kwds)) {
 
 1392       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
 
 1394         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 1395         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 1397         default: 
goto __pyx_L5_argtuple_error;
 
 1399       kw_args = PyDict_Size(__pyx_kwds);
 
 1402         if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
 
 1403         else goto __pyx_L5_argtuple_error;
 
 1406           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_par_mode);
 
 1407           if (value) { values[1] = value; kw_args--; }
 
 1410       if (unlikely(kw_args > 0)) {
 
 1411         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, 
"__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 1414       switch (PyTuple_GET_SIZE(__pyx_args)) {
 
 1415         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 1416         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 1418         default: 
goto __pyx_L5_argtuple_error;
 
 1421     __pyx_v_self = values[0];
 
 1422     __pyx_v_par_mode = values[1];
 
 1424   goto __pyx_L4_argument_unpacking_done;
 
 1425   __pyx_L5_argtuple_error:;
 
 1426   __Pyx_RaiseArgtupleInvalid(
"__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 1428   __Pyx_AddTraceback(
"sioninter.SIONFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 1429   __Pyx_RefNannyFinishContext();
 
 1431   __pyx_L4_argument_unpacking_done:;
 
 1432   __pyx_r = __pyx_pf_9sioninter_8SIONFile___init__(__pyx_self, __pyx_v_self, __pyx_v_par_mode);
 
 1435   __Pyx_RefNannyFinishContext();
 
 1439 static PyObject *__pyx_pf_9sioninter_8SIONFile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_par_mode) {
 
 1440   PyObject *__pyx_r = NULL;
 
 1441   __Pyx_RefNannyDeclarations
 
 1442   PyObject *__pyx_t_1 = NULL;
 
 1445   PyObject *__pyx_t_4 = NULL;
 
 1446   PyObject *__pyx_t_5 = NULL;
 
 1447   int __pyx_lineno = 0;
 
 1448   const char *__pyx_filename = NULL;
 
 1449   int __pyx_clineno = 0;
 
 1450   __Pyx_RefNannySetupContext(
"__init__", 0);
 
 1459   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fname, __pyx_kp_u_) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1468   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_mode, __pyx_kp_u_) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1477   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sid, __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1486   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_valid_par_modes); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1487   __Pyx_GOTREF(__pyx_t_1);
 
 1488   __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_par_mode, __pyx_t_1, Py_NE)); 
if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1489   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 1490   __pyx_t_3 = (__pyx_t_2 != 0);
 
 1500     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_attribute_self__par_mode, __pyx_n_s_format); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1501     __Pyx_GOTREF(__pyx_t_1);
 
 1510     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_par_mode_2); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1511     __Pyx_GOTREF(__pyx_t_4);
 
 1512     __pyx_t_5 = PyTuple_New(1); 
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1513     __Pyx_GOTREF(__pyx_t_5);
 
 1514     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
 
 1515     __Pyx_GIVEREF(__pyx_t_4);
 
 1517     __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1518     __Pyx_GOTREF(__pyx_t_4);
 
 1519     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 1520     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
 1529     __pyx_t_5 = PyTuple_New(1); 
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1530     __Pyx_GOTREF(__pyx_t_5);
 
 1531     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
 
 1532     __Pyx_GIVEREF(__pyx_t_4);
 
 1534     __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_5, NULL); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1535     __Pyx_GOTREF(__pyx_t_4);
 
 1536     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
 1537     __Pyx_Raise(__pyx_t_4, 0, 0, 0);
 
 1538     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 1539     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1549   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_par_mode_2, __pyx_v_par_mode) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1560   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
 1563   __Pyx_XDECREF(__pyx_t_1);
 
 1564   __Pyx_XDECREF(__pyx_t_4);
 
 1565   __Pyx_XDECREF(__pyx_t_5);
 
 1566   __Pyx_AddTraceback(
"sioninter.SIONFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 1569   __Pyx_XGIVEREF(__pyx_r);
 
 1570   __Pyx_RefNannyFinishContext();
 
 1583 static PyObject *__pyx_pw_9sioninter_8SIONFile_3open(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); 
 
 1584 static char __pyx_doc_9sioninter_8SIONFile_2open[] = 
"Open a file for reading or writing.";
 
 1585 static PyMethodDef __pyx_mdef_9sioninter_8SIONFile_3open = {__Pyx_NAMESTR(
"open"), (PyCFunction)__pyx_pw_9sioninter_8SIONFile_3open, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9sioninter_8SIONFile_2open)};
 
 1586 static PyObject *__pyx_pw_9sioninter_8SIONFile_3open(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
 1587   PyObject *__pyx_v_self = 0;
 
 1588   PyObject *__pyx_v_fname = 0;
 
 1589   PyObject *__pyx_v_file_mode = 0;
 
 1590   int __pyx_lineno = 0;
 
 1591   const char *__pyx_filename = NULL;
 
 1592   int __pyx_clineno = 0;
 
 1593   PyObject *__pyx_r = 0;
 
 1594   __Pyx_RefNannyDeclarations
 
 1595   __Pyx_RefNannySetupContext(
"open (wrapper)", 0);
 
 1597     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fname_2,&__pyx_n_s_file_mode_2,0};
 
 1598     PyObject* values[3] = {0,0,0};
 
 1599     if (unlikely(__pyx_kwds)) {
 
 1601       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
 
 1603         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
 1604         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 1605         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 1607         default: 
goto __pyx_L5_argtuple_error;
 
 1609       kw_args = PyDict_Size(__pyx_kwds);
 
 1612         if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
 
 1613         else goto __pyx_L5_argtuple_error;
 
 1615         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fname_2)) != 0)) kw_args--;
 
 1617           __Pyx_RaiseArgtupleInvalid(
"open", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 1620         if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_file_mode_2)) != 0)) kw_args--;
 
 1622           __Pyx_RaiseArgtupleInvalid(
"open", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 1625       if (unlikely(kw_args > 0)) {
 
 1626         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, 
"open") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 1628     } 
else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
 
 1629       goto __pyx_L5_argtuple_error;
 
 1631       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 1632       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 1633       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
 1635     __pyx_v_self = values[0];
 
 1636     __pyx_v_fname = values[1];
 
 1637     __pyx_v_file_mode = values[2];
 
 1639   goto __pyx_L4_argument_unpacking_done;
 
 1640   __pyx_L5_argtuple_error:;
 
 1641   __Pyx_RaiseArgtupleInvalid(
"open", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 1643   __Pyx_AddTraceback(
"sioninter.SIONFile.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 1644   __Pyx_RefNannyFinishContext();
 
 1646   __pyx_L4_argument_unpacking_done:;
 
 1647   __pyx_r = __pyx_pf_9sioninter_8SIONFile_2open(__pyx_self, __pyx_v_self, __pyx_v_fname, __pyx_v_file_mode);
 
 1650   __Pyx_RefNannyFinishContext();
 
 1654 static PyObject *__pyx_pf_9sioninter_8SIONFile_2open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fname, PyObject *__pyx_v_file_mode) {
 
 1655   PyObject *__pyx_r = NULL;
 
 1656   __Pyx_RefNannyDeclarations
 
 1657   PyObject *__pyx_t_1 = NULL;
 
 1659   int __pyx_lineno = 0;
 
 1660   const char *__pyx_filename = NULL;
 
 1661   int __pyx_clineno = 0;
 
 1662   __Pyx_RefNannySetupContext(
"open", 0);
 
 1671   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fname, __pyx_v_fname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1680   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_mode, __pyx_v_file_mode) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1689   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_par_mode_2); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1690   __Pyx_GOTREF(__pyx_t_1);
 
 1691   __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_serial, Py_EQ)); 
if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1692   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 1702     __pyx_t_1 = __pyx_f_9sioninter_sion_open(__pyx_v_fname, __pyx_v_file_mode, NULL); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1703     __Pyx_GOTREF(__pyx_t_1);
 
 1704     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sid, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1705     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 1716   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_par_mode_2); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1717   __Pyx_GOTREF(__pyx_t_1);
 
 1718   __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_mpi, Py_EQ)); 
if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1719   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 1729     __pyx_t_1 = __pyx_f_9sioninter_sion_paropen_mpi(__pyx_v_fname, __pyx_v_file_mode, NULL); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1730     __Pyx_GOTREF(__pyx_t_1);
 
 1731     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sid, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1732     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 1746   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
 1749   __Pyx_XDECREF(__pyx_t_1);
 
 1750   __Pyx_AddTraceback(
"sioninter.SIONFile.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 1753   __Pyx_XGIVEREF(__pyx_r);
 
 1754   __Pyx_RefNannyFinishContext();
 
 1767 static PyObject *__pyx_pw_9sioninter_8SIONFile_5closed(PyObject *__pyx_self, PyObject *__pyx_v_self); 
 
 1768 static char __pyx_doc_9sioninter_8SIONFile_4closed[] = 
"Check whether sion file is closed.";
 
 1769 static PyMethodDef __pyx_mdef_9sioninter_8SIONFile_5closed = {__Pyx_NAMESTR(
"closed"), (PyCFunction)__pyx_pw_9sioninter_8SIONFile_5closed, METH_O, __Pyx_DOCSTR(__pyx_doc_9sioninter_8SIONFile_4closed)};
 
 1770 static PyObject *__pyx_pw_9sioninter_8SIONFile_5closed(PyObject *__pyx_self, PyObject *__pyx_v_self) {
 
 1771   PyObject *__pyx_r = 0;
 
 1772   __Pyx_RefNannyDeclarations
 
 1773   __Pyx_RefNannySetupContext(
"closed (wrapper)", 0);
 
 1774   __pyx_r = __pyx_pf_9sioninter_8SIONFile_4closed(__pyx_self, ((PyObject *)__pyx_v_self));
 
 1777   __Pyx_RefNannyFinishContext();
 
 1781 static PyObject *__pyx_pf_9sioninter_8SIONFile_4closed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
 
 1782   PyObject *__pyx_r = NULL;
 
 1783   __Pyx_RefNannyDeclarations
 
 1784   PyObject *__pyx_t_1 = NULL;
 
 1785   PyObject *__pyx_t_2 = NULL;
 
 1786   int __pyx_lineno = 0;
 
 1787   const char *__pyx_filename = NULL;
 
 1788   int __pyx_clineno = 0;
 
 1789   __Pyx_RefNannySetupContext(
"closed", 0);
 
 1798   __Pyx_XDECREF(__pyx_r);
 
 1799   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sid); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1800   __Pyx_GOTREF(__pyx_t_1);
 
 1801   __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1802   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 1803   __pyx_r = __pyx_t_2;
 
 1817   __Pyx_XDECREF(__pyx_t_1);
 
 1818   __Pyx_XDECREF(__pyx_t_2);
 
 1819   __Pyx_AddTraceback(
"sioninter.SIONFile.closed", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 1822   __Pyx_XGIVEREF(__pyx_r);
 
 1823   __Pyx_RefNannyFinishContext();
 
 1836 static PyObject *__pyx_pw_9sioninter_8SIONFile_7close(PyObject *__pyx_self, PyObject *__pyx_v_self); 
 
 1837 static char __pyx_doc_9sioninter_8SIONFile_6close[] = 
"Close sion file.";
 
 1838 static PyMethodDef __pyx_mdef_9sioninter_8SIONFile_7close = {__Pyx_NAMESTR(
"close"), (PyCFunction)__pyx_pw_9sioninter_8SIONFile_7close, METH_O, __Pyx_DOCSTR(__pyx_doc_9sioninter_8SIONFile_6close)};
 
 1839 static PyObject *__pyx_pw_9sioninter_8SIONFile_7close(PyObject *__pyx_self, PyObject *__pyx_v_self) {
 
 1840   PyObject *__pyx_r = 0;
 
 1841   __Pyx_RefNannyDeclarations
 
 1842   __Pyx_RefNannySetupContext(
"close (wrapper)", 0);
 
 1843   __pyx_r = __pyx_pf_9sioninter_8SIONFile_6close(__pyx_self, ((PyObject *)__pyx_v_self));
 
 1846   __Pyx_RefNannyFinishContext();
 
 1850 static PyObject *__pyx_pf_9sioninter_8SIONFile_6close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
 
 1851   PyObject *__pyx_r = NULL;
 
 1852   __Pyx_RefNannyDeclarations
 
 1853   PyObject *__pyx_t_1 = NULL;
 
 1855   PyObject *__pyx_t_3 = NULL;
 
 1856   int __pyx_lineno = 0;
 
 1857   const char *__pyx_filename = NULL;
 
 1858   int __pyx_clineno = 0;
 
 1859   __Pyx_RefNannySetupContext(
"close", 0);
 
 1868   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_par_mode_2); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1869   __Pyx_GOTREF(__pyx_t_1);
 
 1870   __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_serial, Py_EQ)); 
if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1871   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 1881     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sid); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1882     __Pyx_GOTREF(__pyx_t_1);
 
 1883     __pyx_t_3 = __pyx_f_9sioninter_sion_close(__pyx_t_1); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1884     __Pyx_GOTREF(__pyx_t_3);
 
 1885     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 1886     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
 1897   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_par_mode_2); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1898   __Pyx_GOTREF(__pyx_t_3);
 
 1899   __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_mpi, Py_EQ)); 
if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1900   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
 1910     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sid); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1911     __Pyx_GOTREF(__pyx_t_3);
 
 1912     __pyx_t_1 = __pyx_f_9sioninter_sion_parclose_mpi(__pyx_t_3); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1913     __Pyx_GOTREF(__pyx_t_1);
 
 1914     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
 1915     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 1927   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fname, __pyx_kp_u_) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1936   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_mode, __pyx_kp_u_) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1945   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sid, __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 1956   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
 1959   __Pyx_XDECREF(__pyx_t_1);
 
 1960   __Pyx_XDECREF(__pyx_t_3);
 
 1961   __Pyx_AddTraceback(
"sioninter.SIONFile.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 1964   __Pyx_XGIVEREF(__pyx_r);
 
 1965   __Pyx_RefNannyFinishContext();
 
 1978 static PyObject *__pyx_pw_9sioninter_8SIONFile_9write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); 
 
 1979 static char __pyx_doc_9sioninter_8SIONFile_8write[] = 
"Write data.";
 
 1980 static PyMethodDef __pyx_mdef_9sioninter_8SIONFile_9write = {__Pyx_NAMESTR(
"write"), (PyCFunction)__pyx_pw_9sioninter_8SIONFile_9write, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9sioninter_8SIONFile_8write)};
 
 1981 static PyObject *__pyx_pw_9sioninter_8SIONFile_9write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
 1982   PyObject *__pyx_v_self = 0;
 
 1983   PyObject *__pyx_v_data = 0;
 
 1984   int __pyx_lineno = 0;
 
 1985   const char *__pyx_filename = NULL;
 
 1986   int __pyx_clineno = 0;
 
 1987   PyObject *__pyx_r = 0;
 
 1988   __Pyx_RefNannyDeclarations
 
 1989   __Pyx_RefNannySetupContext(
"write (wrapper)", 0);
 
 1991     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
 
 1992     PyObject* values[2] = {0,0};
 
 1993     if (unlikely(__pyx_kwds)) {
 
 1995       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
 
 1997         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 1998         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 2000         default: 
goto __pyx_L5_argtuple_error;
 
 2002       kw_args = PyDict_Size(__pyx_kwds);
 
 2005         if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
 
 2006         else goto __pyx_L5_argtuple_error;
 
 2008         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
 
 2010           __Pyx_RaiseArgtupleInvalid(
"write", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2013       if (unlikely(kw_args > 0)) {
 
 2014         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, 
"write") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2016     } 
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
 
 2017       goto __pyx_L5_argtuple_error;
 
 2019       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 2020       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 2022     __pyx_v_self = values[0];
 
 2023     __pyx_v_data = values[1];
 
 2025   goto __pyx_L4_argument_unpacking_done;
 
 2026   __pyx_L5_argtuple_error:;
 
 2027   __Pyx_RaiseArgtupleInvalid(
"write", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2029   __Pyx_AddTraceback(
"sioninter.SIONFile.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2030   __Pyx_RefNannyFinishContext();
 
 2032   __pyx_L4_argument_unpacking_done:;
 
 2033   __pyx_r = __pyx_pf_9sioninter_8SIONFile_8write(__pyx_self, __pyx_v_self, __pyx_v_data);
 
 2036   __Pyx_RefNannyFinishContext();
 
 2040 static PyObject *__pyx_pf_9sioninter_8SIONFile_8write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
 
 2041   PyObject *__pyx_r = NULL;
 
 2042   __Pyx_RefNannyDeclarations
 
 2043   PyObject *__pyx_t_1 = NULL;
 
 2044   PyObject *__pyx_t_2 = NULL;
 
 2045   int __pyx_lineno = 0;
 
 2046   const char *__pyx_filename = NULL;
 
 2047   int __pyx_clineno = 0;
 
 2048   __Pyx_RefNannySetupContext(
"write", 0);
 
 2057   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sid); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2058   __Pyx_GOTREF(__pyx_t_1);
 
 2059   __pyx_t_2 = __pyx_f_9sioninter_sion_fwrite(__pyx_v_data, __pyx_t_1); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2060   __Pyx_GOTREF(__pyx_t_2);
 
 2061   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 2062   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
 2073   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
 2076   __Pyx_XDECREF(__pyx_t_1);
 
 2077   __Pyx_XDECREF(__pyx_t_2);
 
 2078   __Pyx_AddTraceback(
"sioninter.SIONFile.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2081   __Pyx_XGIVEREF(__pyx_r);
 
 2082   __Pyx_RefNannyFinishContext();
 
 2094 static PyObject *__pyx_pf_9sioninter_8SIONFile_18__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
 
 2095   PyObject *__pyx_r = NULL;
 
 2096   __Pyx_RefNannyDeclarations
 
 2097   PyObject *__pyx_t_1 = NULL;
 
 2098   PyObject *__pyx_t_2 = NULL;
 
 2099   int __pyx_lineno = 0;
 
 2100   const char *__pyx_filename = NULL;
 
 2101   int __pyx_clineno = 0;
 
 2102   __Pyx_RefNannySetupContext(
"__defaults__", 0);
 
 2103   __Pyx_XDECREF(__pyx_r);
 
 2104   __pyx_t_1 = PyTuple_New(1); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2105   __Pyx_GOTREF(__pyx_t_1);
 
 2106   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_nitems);
 
 2107   PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_nitems);
 
 2108   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_nitems);
 
 2109   __pyx_t_2 = PyTuple_New(2); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2110   __Pyx_GOTREF(__pyx_t_2);
 
 2111   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
 
 2112   __Pyx_GIVEREF(__pyx_t_1);
 
 2113   __Pyx_INCREF(Py_None);
 
 2114   PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
 
 2115   __Pyx_GIVEREF(Py_None);
 
 2117   __pyx_r = __pyx_t_2;
 
 2123   __Pyx_XDECREF(__pyx_t_1);
 
 2124   __Pyx_XDECREF(__pyx_t_2);
 
 2125   __Pyx_AddTraceback(
"sioninter.SIONFile.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2128   __Pyx_XGIVEREF(__pyx_r);
 
 2129   __Pyx_RefNannyFinishContext();
 
 2134 static PyObject *__pyx_pw_9sioninter_8SIONFile_11read(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); 
 
 2135 static char __pyx_doc_9sioninter_8SIONFile_10read[] = 
"Read data.";
 
 2136 static PyMethodDef __pyx_mdef_9sioninter_8SIONFile_11read = {__Pyx_NAMESTR(
"read"), (PyCFunction)__pyx_pw_9sioninter_8SIONFile_11read, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9sioninter_8SIONFile_10read)};
 
 2137 static PyObject *__pyx_pw_9sioninter_8SIONFile_11read(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
 2138   PyObject *__pyx_v_self = 0;
 
 2139   PyObject *__pyx_v_nitems = 0;
 
 2140   int __pyx_lineno = 0;
 
 2141   const char *__pyx_filename = NULL;
 
 2142   int __pyx_clineno = 0;
 
 2143   PyObject *__pyx_r = 0;
 
 2144   __Pyx_RefNannyDeclarations
 
 2145   __Pyx_RefNannySetupContext(
"read (wrapper)", 0);
 
 2147     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_nitems,0};
 
 2148     PyObject* values[2] = {0,0};
 
 2149     __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
 
 2150     values[1] = __pyx_dynamic_args->__pyx_arg_nitems;
 
 2151     if (unlikely(__pyx_kwds)) {
 
 2153       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
 
 2155         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 2156         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 2158         default: 
goto __pyx_L5_argtuple_error;
 
 2160       kw_args = PyDict_Size(__pyx_kwds);
 
 2163         if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
 
 2164         else goto __pyx_L5_argtuple_error;
 
 2167           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nitems);
 
 2168           if (value) { values[1] = value; kw_args--; }
 
 2171       if (unlikely(kw_args > 0)) {
 
 2172         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, 
"read") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2175       switch (PyTuple_GET_SIZE(__pyx_args)) {
 
 2176         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 2177         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 2179         default: 
goto __pyx_L5_argtuple_error;
 
 2182     __pyx_v_self = values[0];
 
 2183     __pyx_v_nitems = values[1];
 
 2185   goto __pyx_L4_argument_unpacking_done;
 
 2186   __pyx_L5_argtuple_error:;
 
 2187   __Pyx_RaiseArgtupleInvalid(
"read", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2189   __Pyx_AddTraceback(
"sioninter.SIONFile.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2190   __Pyx_RefNannyFinishContext();
 
 2192   __pyx_L4_argument_unpacking_done:;
 
 2193   __pyx_r = __pyx_pf_9sioninter_8SIONFile_10read(__pyx_self, __pyx_v_self, __pyx_v_nitems);
 
 2196   __Pyx_RefNannyFinishContext();
 
 2200 static PyObject *__pyx_pf_9sioninter_8SIONFile_10read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_nitems) {
 
 2201   PyObject *__pyx_v_ret = NULL;
 
 2202   PyObject *__pyx_r = NULL;
 
 2203   __Pyx_RefNannyDeclarations
 
 2204   PyObject *__pyx_t_1 = NULL;
 
 2205   PyObject *__pyx_t_2 = NULL;
 
 2206   struct __pyx_opt_args_9sioninter_sion_fread __pyx_t_3;
 
 2207   int __pyx_lineno = 0;
 
 2208   const char *__pyx_filename = NULL;
 
 2209   int __pyx_clineno = 0;
 
 2210   __Pyx_RefNannySetupContext(
"read", 0);
 
 2219   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sid); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2220   __Pyx_GOTREF(__pyx_t_1);
 
 2221   __pyx_t_3.__pyx_n = 1;
 
 2222   __pyx_t_3.nitems = __pyx_v_nitems;
 
 2223   __pyx_t_2 = __pyx_f_9sioninter_sion_fread(__pyx_t_1, &__pyx_t_3); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2224   __Pyx_GOTREF(__pyx_t_2);
 
 2225   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 2226   __pyx_v_ret = __pyx_t_2;
 
 2236   __Pyx_XDECREF(__pyx_r);
 
 2237   __Pyx_INCREF(__pyx_v_ret);
 
 2238   __pyx_r = __pyx_v_ret;
 
 2251   __Pyx_XDECREF(__pyx_t_1);
 
 2252   __Pyx_XDECREF(__pyx_t_2);
 
 2253   __Pyx_AddTraceback(
"sioninter.SIONFile.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2256   __Pyx_XDECREF(__pyx_v_ret);
 
 2257   __Pyx_XGIVEREF(__pyx_r);
 
 2258   __Pyx_RefNannyFinishContext();
 
 2271 static PyObject *__pyx_pw_9sioninter_8SIONFile_13write_key(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); 
 
 2272 static char __pyx_doc_9sioninter_8SIONFile_12write_key[] = 
"Write key value pair.";
 
 2273 static PyMethodDef __pyx_mdef_9sioninter_8SIONFile_13write_key = {__Pyx_NAMESTR(
"write_key"), (PyCFunction)__pyx_pw_9sioninter_8SIONFile_13write_key, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9sioninter_8SIONFile_12write_key)};
 
 2274 static PyObject *__pyx_pw_9sioninter_8SIONFile_13write_key(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
 2275   PyObject *__pyx_v_self = 0;
 
 2276   PyObject *__pyx_v_data = 0;
 
 2277   PyObject *__pyx_v_key = 0;
 
 2278   int __pyx_lineno = 0;
 
 2279   const char *__pyx_filename = NULL;
 
 2280   int __pyx_clineno = 0;
 
 2281   PyObject *__pyx_r = 0;
 
 2282   __Pyx_RefNannyDeclarations
 
 2283   __Pyx_RefNannySetupContext(
"write_key (wrapper)", 0);
 
 2285     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,&__pyx_n_s_key,0};
 
 2286     PyObject* values[3] = {0,0,0};
 
 2287     if (unlikely(__pyx_kwds)) {
 
 2289       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
 
 2291         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
 2292         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 2293         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 2295         default: 
goto __pyx_L5_argtuple_error;
 
 2297       kw_args = PyDict_Size(__pyx_kwds);
 
 2300         if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
 
 2301         else goto __pyx_L5_argtuple_error;
 
 2303         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
 
 2305           __Pyx_RaiseArgtupleInvalid(
"write_key", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2308         if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
 
 2310           __Pyx_RaiseArgtupleInvalid(
"write_key", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2313       if (unlikely(kw_args > 0)) {
 
 2314         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, 
"write_key") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2316     } 
else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
 
 2317       goto __pyx_L5_argtuple_error;
 
 2319       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 2320       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 2321       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
 2323     __pyx_v_self = values[0];
 
 2324     __pyx_v_data = values[1];
 
 2325     __pyx_v_key = values[2];
 
 2327   goto __pyx_L4_argument_unpacking_done;
 
 2328   __pyx_L5_argtuple_error:;
 
 2329   __Pyx_RaiseArgtupleInvalid(
"write_key", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2331   __Pyx_AddTraceback(
"sioninter.SIONFile.write_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2332   __Pyx_RefNannyFinishContext();
 
 2334   __pyx_L4_argument_unpacking_done:;
 
 2335   __pyx_r = __pyx_pf_9sioninter_8SIONFile_12write_key(__pyx_self, __pyx_v_self, __pyx_v_data, __pyx_v_key);
 
 2338   __Pyx_RefNannyFinishContext();
 
 2342 static PyObject *__pyx_pf_9sioninter_8SIONFile_12write_key(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_key) {
 
 2343   PyObject *__pyx_r = NULL;
 
 2344   __Pyx_RefNannyDeclarations
 
 2345   PyObject *__pyx_t_1 = NULL;
 
 2346   PyObject *__pyx_t_2 = NULL;
 
 2347   int __pyx_lineno = 0;
 
 2348   const char *__pyx_filename = NULL;
 
 2349   int __pyx_clineno = 0;
 
 2350   __Pyx_RefNannySetupContext(
"write_key", 0);
 
 2359   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sid); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2360   __Pyx_GOTREF(__pyx_t_1);
 
 2361   __pyx_t_2 = __pyx_f_9sioninter_sion_fwrite_key(__pyx_v_data, __pyx_v_key, __pyx_t_1, 0); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2362   __Pyx_GOTREF(__pyx_t_2);
 
 2363   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 2364   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
 2375   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
 2378   __Pyx_XDECREF(__pyx_t_1);
 
 2379   __Pyx_XDECREF(__pyx_t_2);
 
 2380   __Pyx_AddTraceback(
"sioninter.SIONFile.write_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2383   __Pyx_XGIVEREF(__pyx_r);
 
 2384   __Pyx_RefNannyFinishContext();
 
 2396 static PyObject *__pyx_pf_9sioninter_8SIONFile_20__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
 
 2397   PyObject *__pyx_r = NULL;
 
 2398   __Pyx_RefNannyDeclarations
 
 2399   PyObject *__pyx_t_1 = NULL;
 
 2400   PyObject *__pyx_t_2 = NULL;
 
 2401   int __pyx_lineno = 0;
 
 2402   const char *__pyx_filename = NULL;
 
 2403   int __pyx_clineno = 0;
 
 2404   __Pyx_RefNannySetupContext(
"__defaults__", 0);
 
 2405   __Pyx_XDECREF(__pyx_r);
 
 2406   __pyx_t_1 = PyTuple_New(1); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2407   __Pyx_GOTREF(__pyx_t_1);
 
 2408   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_nitems);
 
 2409   PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_nitems);
 
 2410   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_nitems);
 
 2411   __pyx_t_2 = PyTuple_New(2); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2412   __Pyx_GOTREF(__pyx_t_2);
 
 2413   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
 
 2414   __Pyx_GIVEREF(__pyx_t_1);
 
 2415   __Pyx_INCREF(Py_None);
 
 2416   PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
 
 2417   __Pyx_GIVEREF(Py_None);
 
 2419   __pyx_r = __pyx_t_2;
 
 2425   __Pyx_XDECREF(__pyx_t_1);
 
 2426   __Pyx_XDECREF(__pyx_t_2);
 
 2427   __Pyx_AddTraceback(
"sioninter.SIONFile.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2430   __Pyx_XGIVEREF(__pyx_r);
 
 2431   __Pyx_RefNannyFinishContext();
 
 2436 static PyObject *__pyx_pw_9sioninter_8SIONFile_15read_key(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); 
 
 2437 static char __pyx_doc_9sioninter_8SIONFile_14read_key[] = 
"Read value for corresponding key.";
 
 2438 static PyMethodDef __pyx_mdef_9sioninter_8SIONFile_15read_key = {__Pyx_NAMESTR(
"read_key"), (PyCFunction)__pyx_pw_9sioninter_8SIONFile_15read_key, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9sioninter_8SIONFile_14read_key)};
 
 2439 static PyObject *__pyx_pw_9sioninter_8SIONFile_15read_key(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
 2440   PyObject *__pyx_v_self = 0;
 
 2441   PyObject *__pyx_v_key = 0;
 
 2442   PyObject *__pyx_v_nitems = 0;
 
 2443   int __pyx_lineno = 0;
 
 2444   const char *__pyx_filename = NULL;
 
 2445   int __pyx_clineno = 0;
 
 2446   PyObject *__pyx_r = 0;
 
 2447   __Pyx_RefNannyDeclarations
 
 2448   __Pyx_RefNannySetupContext(
"read_key (wrapper)", 0);
 
 2450     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key,&__pyx_n_s_nitems,0};
 
 2451     PyObject* values[3] = {0,0,0};
 
 2452     __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self);
 
 2453     values[2] = __pyx_dynamic_args->__pyx_arg_nitems;
 
 2454     if (unlikely(__pyx_kwds)) {
 
 2456       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
 
 2458         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
 2459         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 2460         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 2462         default: 
goto __pyx_L5_argtuple_error;
 
 2464       kw_args = PyDict_Size(__pyx_kwds);
 
 2467         if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
 
 2468         else goto __pyx_L5_argtuple_error;
 
 2470         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
 
 2472           __Pyx_RaiseArgtupleInvalid(
"read_key", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2476           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nitems);
 
 2477           if (value) { values[2] = value; kw_args--; }
 
 2480       if (unlikely(kw_args > 0)) {
 
 2481         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, 
"read_key") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2484       switch (PyTuple_GET_SIZE(__pyx_args)) {
 
 2485         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
 2486         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 2487         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 2489         default: 
goto __pyx_L5_argtuple_error;
 
 2492     __pyx_v_self = values[0];
 
 2493     __pyx_v_key = values[1];
 
 2494     __pyx_v_nitems = values[2];
 
 2496   goto __pyx_L4_argument_unpacking_done;
 
 2497   __pyx_L5_argtuple_error:;
 
 2498   __Pyx_RaiseArgtupleInvalid(
"read_key", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2500   __Pyx_AddTraceback(
"sioninter.SIONFile.read_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2501   __Pyx_RefNannyFinishContext();
 
 2503   __pyx_L4_argument_unpacking_done:;
 
 2504   __pyx_r = __pyx_pf_9sioninter_8SIONFile_14read_key(__pyx_self, __pyx_v_self, __pyx_v_key, __pyx_v_nitems);
 
 2507   __Pyx_RefNannyFinishContext();
 
 2511 static PyObject *__pyx_pf_9sioninter_8SIONFile_14read_key(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_nitems) {
 
 2512   PyObject *__pyx_v_ret = NULL;
 
 2513   PyObject *__pyx_r = NULL;
 
 2514   __Pyx_RefNannyDeclarations
 
 2515   PyObject *__pyx_t_1 = NULL;
 
 2516   PyObject *__pyx_t_2 = NULL;
 
 2517   struct __pyx_opt_args_9sioninter_sion_fread_key __pyx_t_3;
 
 2518   int __pyx_lineno = 0;
 
 2519   const char *__pyx_filename = NULL;
 
 2520   int __pyx_clineno = 0;
 
 2521   __Pyx_RefNannySetupContext(
"read_key", 0);
 
 2530   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sid); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2531   __Pyx_GOTREF(__pyx_t_1);
 
 2532   __pyx_t_3.__pyx_n = 1;
 
 2533   __pyx_t_3.nitems = __pyx_v_nitems;
 
 2534   __pyx_t_2 = __pyx_f_9sioninter_sion_fread_key(__pyx_v_key, __pyx_t_1, 0, &__pyx_t_3); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2535   __Pyx_GOTREF(__pyx_t_2);
 
 2536   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 2537   __pyx_v_ret = __pyx_t_2;
 
 2547   __Pyx_XDECREF(__pyx_r);
 
 2548   __Pyx_INCREF(__pyx_v_ret);
 
 2549   __pyx_r = __pyx_v_ret;
 
 2562   __Pyx_XDECREF(__pyx_t_1);
 
 2563   __Pyx_XDECREF(__pyx_t_2);
 
 2564   __Pyx_AddTraceback(
"sioninter.SIONFile.read_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2567   __Pyx_XDECREF(__pyx_v_ret);
 
 2568   __Pyx_XGIVEREF(__pyx_r);
 
 2569   __Pyx_RefNannyFinishContext();
 
 2582 static PyObject *__pyx_pw_9sioninter_1open(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); 
 
 2583 static char __pyx_doc_9sioninter_open[] = 
"Open a file and return a SIONFile instance.";
 
 2584 static PyMethodDef __pyx_mdef_9sioninter_1open = {__Pyx_NAMESTR(
"open"), (PyCFunction)__pyx_pw_9sioninter_1open, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9sioninter_open)};
 
 2585 static PyObject *__pyx_pw_9sioninter_1open(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
 2586   PyObject *__pyx_v_fname = 0;
 
 2587   PyObject *__pyx_v_file_mode = 0;
 
 2588   PyObject *__pyx_v_par_mode = 0;
 
 2589   int __pyx_lineno = 0;
 
 2590   const char *__pyx_filename = NULL;
 
 2591   int __pyx_clineno = 0;
 
 2592   PyObject *__pyx_r = 0;
 
 2593   __Pyx_RefNannyDeclarations
 
 2594   __Pyx_RefNannySetupContext(
"open (wrapper)", 0);
 
 2596     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fname_2,&__pyx_n_s_file_mode_2,&__pyx_n_s_par_mode,0};
 
 2597     PyObject* values[3] = {0,0,0};
 
 2598     values[2] = __pyx_k__2;
 
 2599     if (unlikely(__pyx_kwds)) {
 
 2601       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
 
 2603         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
 2604         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 2605         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 2607         default: 
goto __pyx_L5_argtuple_error;
 
 2609       kw_args = PyDict_Size(__pyx_kwds);
 
 2612         if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fname_2)) != 0)) kw_args--;
 
 2613         else goto __pyx_L5_argtuple_error;
 
 2615         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_file_mode_2)) != 0)) kw_args--;
 
 2617           __Pyx_RaiseArgtupleInvalid(
"open", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2621           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_par_mode);
 
 2622           if (value) { values[2] = value; kw_args--; }
 
 2625       if (unlikely(kw_args > 0)) {
 
 2626         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, 
"open") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2629       switch (PyTuple_GET_SIZE(__pyx_args)) {
 
 2630         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
 2631         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 2632         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 2634         default: 
goto __pyx_L5_argtuple_error;
 
 2637     __pyx_v_fname = values[0];
 
 2638     __pyx_v_file_mode = values[1];
 
 2639     __pyx_v_par_mode = values[2];
 
 2641   goto __pyx_L4_argument_unpacking_done;
 
 2642   __pyx_L5_argtuple_error:;
 
 2643   __Pyx_RaiseArgtupleInvalid(
"open", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 2645   __Pyx_AddTraceback(
"sioninter.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2646   __Pyx_RefNannyFinishContext();
 
 2648   __pyx_L4_argument_unpacking_done:;
 
 2649   __pyx_r = __pyx_pf_9sioninter_open(__pyx_self, __pyx_v_fname, __pyx_v_file_mode, __pyx_v_par_mode);
 
 2652   __Pyx_RefNannyFinishContext();
 
 2656 static PyObject *__pyx_pf_9sioninter_open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fname, PyObject *__pyx_v_file_mode, PyObject *__pyx_v_par_mode) {
 
 2657   PyObject *__pyx_v_sionfile = NULL;
 
 2658   PyObject *__pyx_r = NULL;
 
 2659   __Pyx_RefNannyDeclarations
 
 2660   PyObject *__pyx_t_1 = NULL;
 
 2661   PyObject *__pyx_t_2 = NULL;
 
 2662   PyObject *__pyx_t_3 = NULL;
 
 2663   int __pyx_lineno = 0;
 
 2664   const char *__pyx_filename = NULL;
 
 2665   int __pyx_clineno = 0;
 
 2666   __Pyx_RefNannySetupContext(
"open", 0);
 
 2675   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_SIONFile); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2676   __Pyx_GOTREF(__pyx_t_1);
 
 2677   __pyx_t_2 = PyDict_New(); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2678   __Pyx_GOTREF(__pyx_t_2);
 
 2679   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_par_mode, __pyx_v_par_mode) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2680   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2681   __Pyx_GOTREF(__pyx_t_3);
 
 2682   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 2683   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
 2684   __pyx_v_sionfile = __pyx_t_3;
 
 2694   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sionfile, __pyx_n_s_open); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2695   __Pyx_GOTREF(__pyx_t_3);
 
 2696   __pyx_t_2 = PyTuple_New(2); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2697   __Pyx_GOTREF(__pyx_t_2);
 
 2698   __Pyx_INCREF(__pyx_v_fname);
 
 2699   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fname);
 
 2700   __Pyx_GIVEREF(__pyx_v_fname);
 
 2701   __Pyx_INCREF(__pyx_v_file_mode);
 
 2702   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_file_mode);
 
 2703   __Pyx_GIVEREF(__pyx_v_file_mode);
 
 2704   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2705   __Pyx_GOTREF(__pyx_t_1);
 
 2706   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
 2707   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
 2708   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 2717   __Pyx_XDECREF(__pyx_r);
 
 2718   __Pyx_INCREF(__pyx_v_sionfile);
 
 2719   __pyx_r = __pyx_v_sionfile;
 
 2732   __Pyx_XDECREF(__pyx_t_1);
 
 2733   __Pyx_XDECREF(__pyx_t_2);
 
 2734   __Pyx_XDECREF(__pyx_t_3);
 
 2735   __Pyx_AddTraceback(
"sioninter.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2738   __Pyx_XDECREF(__pyx_v_sionfile);
 
 2739   __Pyx_XGIVEREF(__pyx_r);
 
 2740   __Pyx_RefNannyFinishContext();
 
 2752 static PyObject *__pyx_f_9sioninter_sion_open(PyObject *__pyx_v_fname, PyObject *__pyx_v_file_mode, 
struct __pyx_opt_args_9sioninter_sion_open *__pyx_optional_args) {
 
 2753   PyObject *__pyx_v_ntasks = __pyx_k__3;
 
 2754   PyObject *__pyx_v_nfiles = __pyx_k__4;
 
 2755   PyObject *__pyx_v_fsblksize = __pyx_k__5;
 
 2756   int __pyx_v__ntasks;
 
 2757   int __pyx_v__nfiles;
 
 2758   __pyx_t_10csioninter_sion_int32 __pyx_v__fsblksize;
 
 2759   int *__pyx_v__globalranks;
 
 2760   __pyx_t_10csioninter_sion_int64 *__pyx_v__chunksizes;
 
 2761   FILE *__pyx_v__fileptr;
 
 2762   PyObject *__pyx_v_fname_b = NULL;
 
 2763   PyObject *__pyx_v_file_mode_b = NULL;
 
 2766   PyObject *__pyx_r = NULL;
 
 2767   __Pyx_RefNannyDeclarations
 
 2769   __pyx_t_10csioninter_sion_int32 __pyx_t_2;
 
 2770   PyObject *__pyx_t_3 = NULL;
 
 2771   PyObject *__pyx_t_4 = NULL;
 
 2773   __pyx_t_10csioninter_sion_int64 __pyx_t_6;
 
 2775   char const *__pyx_t_8;
 
 2776   int __pyx_lineno = 0;
 
 2777   const char *__pyx_filename = NULL;
 
 2778   int __pyx_clineno = 0;
 
 2779   __Pyx_RefNannySetupContext(
"sion_open", 0);
 
 2780   if (__pyx_optional_args) {
 
 2781     if (__pyx_optional_args->__pyx_n > 0) {
 
 2782       __pyx_v_ntasks = __pyx_optional_args->ntasks;
 
 2783       if (__pyx_optional_args->__pyx_n > 1) {
 
 2784         __pyx_v_nfiles = __pyx_optional_args->nfiles;
 
 2785         if (__pyx_optional_args->__pyx_n > 3) {
 
 2786           __pyx_v_fsblksize = __pyx_optional_args->fsblksize;
 
 2799   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_ntasks); 
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2800   __pyx_v__ntasks = __pyx_t_1;
 
 2809   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_nfiles); 
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2810   __pyx_v__nfiles = __pyx_t_1;
 
 2819   __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_fsblksize); 
if (unlikely((__pyx_t_2 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2820   __pyx_v__fsblksize = __pyx_t_2;
 
 2829   __pyx_v__globalranks = NULL;
 
 2838   __pyx_v__chunksizes = NULL;
 
 2847   __pyx_v__fileptr = NULL;
 
 2856   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fname, __pyx_n_s_encode); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2857   __Pyx_GOTREF(__pyx_t_3);
 
 2858   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2859   __Pyx_GOTREF(__pyx_t_4);
 
 2860   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
 2861   __pyx_v_fname_b = __pyx_t_4;
 
 2871   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_file_mode, __pyx_n_s_encode); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2872   __Pyx_GOTREF(__pyx_t_4);
 
 2873   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2874   __Pyx_GOTREF(__pyx_t_3);
 
 2875   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 2876   __pyx_v_file_mode_b = __pyx_t_3;
 
 2886   __pyx_v__chunksizes = ((__pyx_t_10csioninter_sion_int64 *)malloc((__pyx_v__ntasks * (
sizeof(__pyx_t_10csioninter_sion_int64)))));
 
 2895   __pyx_v__globalranks = ((
int *)malloc((__pyx_v__ntasks * (
sizeof(
int)))));
 
 2904   for (__pyx_t_5 = 0; __pyx_t_5 < 1; __pyx_t_5+=1) {
 
 2905     __pyx_v_rank = __pyx_t_5;
 
 2914     __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_CHUNKSIZE); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2915     __Pyx_GOTREF(__pyx_t_3);
 
 2916     __pyx_t_6 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_3); 
if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2917     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
 2918     (__pyx_v__chunksizes[__pyx_v_rank]) = __pyx_t_6;
 
 2927     (__pyx_v__globalranks[__pyx_v_rank]) = 0;
 
 2937   __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_fname_b); 
if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2938   __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_file_mode_b); 
if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2947   __pyx_v_ret = 
sion_open(__pyx_t_7, __pyx_t_8, (&__pyx_v__ntasks), (&__pyx_v__nfiles), (&__pyx_v__chunksizes), (&__pyx_v__fsblksize), (&__pyx_v__globalranks), (&__pyx_v__fileptr));
 
 2956   free(__pyx_v__chunksizes);
 
 2965   free(__pyx_v__globalranks);
 
 2974   __Pyx_XDECREF(__pyx_r);
 
 2975   __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 2976   __Pyx_GOTREF(__pyx_t_3);
 
 2977   __pyx_r = __pyx_t_3;
 
 2991   __Pyx_XDECREF(__pyx_t_3);
 
 2992   __Pyx_XDECREF(__pyx_t_4);
 
 2993   __Pyx_AddTraceback(
"sioninter.sion_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 2996   __Pyx_XDECREF(__pyx_v_fname_b);
 
 2997   __Pyx_XDECREF(__pyx_v_file_mode_b);
 
 2998   __Pyx_XGIVEREF(__pyx_r);
 
 2999   __Pyx_RefNannyFinishContext();
 
 3011 static PyObject *__pyx_f_9sioninter_sion_close(PyObject *__pyx_v_sid) {
 
 3013   PyObject *__pyx_r = NULL;
 
 3014   __Pyx_RefNannyDeclarations
 
 3016   PyObject *__pyx_t_2 = NULL;
 
 3017   int __pyx_lineno = 0;
 
 3018   const char *__pyx_filename = NULL;
 
 3019   int __pyx_clineno = 0;
 
 3020   __Pyx_RefNannySetupContext(
"sion_close", 0);
 
 3029   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_sid); 
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3039   __Pyx_XDECREF(__pyx_r);
 
 3040   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3041   __Pyx_GOTREF(__pyx_t_2);
 
 3042   __pyx_r = __pyx_t_2;
 
 3056   __Pyx_XDECREF(__pyx_t_2);
 
 3057   __Pyx_AddTraceback(
"sioninter.sion_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 3060   __Pyx_XGIVEREF(__pyx_r);
 
 3061   __Pyx_RefNannyFinishContext();
 
 3073 static PyObject *__pyx_f_9sioninter_sion_paropen_mpi(PyObject *__pyx_v_fname, PyObject *__pyx_v_file_mode, 
struct __pyx_opt_args_9sioninter_sion_paropen_mpi *__pyx_optional_args) {
 
 3074   PyObject *__pyx_v_nfiles = __pyx_k__6;
 
 3075   PyObject *__pyx_v_chunksize = __pyx_k__7;
 
 3076   PyObject *__pyx_v_fsblksize = __pyx_k__8;
 
 3077   PyObject *__pyx_v_globalrank = __pyx_k__9;
 
 3078   int __pyx_v__nfiles;
 
 3079   __pyx_t_10csioninter_sion_int32 __pyx_v__fsblksize;
 
 3080   int __pyx_v__globalrank;
 
 3081   __pyx_t_10csioninter_sion_int64 __pyx_v__chunksize;
 
 3082   FILE *__pyx_v__fileptr;
 
 3083   MPI_Comm __pyx_v__gComm;
 
 3084   MPI_Comm __pyx_v__lComm;
 
 3085   char *__pyx_v__newname;
 
 3086   PyObject *__pyx_v_fname_b = NULL;
 
 3087   PyObject *__pyx_v_file_mode_b = NULL;
 
 3088   PyObject *__pyx_v_comm = NULL;
 
 3089   PyObject *__pyx_v_rank = NULL;
 
 3091   PyObject *__pyx_r = NULL;
 
 3092   __Pyx_RefNannyDeclarations
 
 3094   __pyx_t_10csioninter_sion_int32 __pyx_t_2;
 
 3095   __pyx_t_10csioninter_sion_int64 __pyx_t_3;
 
 3096   PyObject *__pyx_t_4 = NULL;
 
 3097   PyObject *__pyx_t_5 = NULL;
 
 3099   char const *__pyx_t_7;
 
 3100   int __pyx_lineno = 0;
 
 3101   const char *__pyx_filename = NULL;
 
 3102   int __pyx_clineno = 0;
 
 3103   __Pyx_RefNannySetupContext(
"sion_paropen_mpi", 0);
 
 3104   if (__pyx_optional_args) {
 
 3105     if (__pyx_optional_args->__pyx_n > 0) {
 
 3106       __pyx_v_nfiles = __pyx_optional_args->nfiles;
 
 3107       if (__pyx_optional_args->__pyx_n > 3) {
 
 3108         __pyx_v_chunksize = __pyx_optional_args->chunksize;
 
 3109         if (__pyx_optional_args->__pyx_n > 4) {
 
 3110           __pyx_v_fsblksize = __pyx_optional_args->fsblksize;
 
 3111           if (__pyx_optional_args->__pyx_n > 5) {
 
 3112             __pyx_v_globalrank = __pyx_optional_args->globalrank;
 
 3126   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_nfiles); 
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3127   __pyx_v__nfiles = __pyx_t_1;
 
 3136   __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_fsblksize); 
if (unlikely((__pyx_t_2 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3137   __pyx_v__fsblksize = __pyx_t_2;
 
 3146   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_globalrank); 
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3147   __pyx_v__globalrank = __pyx_t_1;
 
 3156   __pyx_t_3 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_chunksize); 
if (unlikely((__pyx_t_3 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3157   __pyx_v__chunksize = __pyx_t_3;
 
 3166   __pyx_v__fileptr = NULL;
 
 3175   __pyx_v__gComm = NULL;
 
 3184   __pyx_v__lComm = NULL;
 
 3193   __pyx_v__newname = NULL;
 
 3202   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fname, __pyx_n_s_encode); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3203   __Pyx_GOTREF(__pyx_t_4);
 
 3204   __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); 
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3205   __Pyx_GOTREF(__pyx_t_5);
 
 3206   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 3207   __pyx_v_fname_b = __pyx_t_5;
 
 3217   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_file_mode, __pyx_n_s_encode); 
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3218   __Pyx_GOTREF(__pyx_t_5);
 
 3219   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3220   __Pyx_GOTREF(__pyx_t_4);
 
 3221   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
 3222   __pyx_v_file_mode_b = __pyx_t_4;
 
 3232   __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_MPI); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3233   __Pyx_GOTREF(__pyx_t_4);
 
 3234   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_COMM_WORLD); 
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3235   __Pyx_GOTREF(__pyx_t_5);
 
 3236   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 3237   __pyx_v_comm = __pyx_t_5;
 
 3247   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_Get_rank); 
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3248   __Pyx_GOTREF(__pyx_t_5);
 
 3249   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3250   __Pyx_GOTREF(__pyx_t_4);
 
 3251   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
 3252   __pyx_v_rank = __pyx_t_4;
 
 3262   __pyx_v__gComm = MPI_COMM_WORLD;
 
 3271   __pyx_v__lComm = __pyx_v__gComm;
 
 3280   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_rank); 
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3281   __pyx_v__globalrank = __pyx_t_1;
 
 3290   __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_fname_b); 
if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3291   __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_file_mode_b); 
if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3300   __pyx_v_ret = 
sion_paropen_mpi(__pyx_t_6, __pyx_t_7, (&__pyx_v__nfiles), __pyx_v__gComm, (&__pyx_v__lComm), (&__pyx_v__chunksize), (&__pyx_v__fsblksize), (&__pyx_v__globalrank), (&__pyx_v__fileptr), (&__pyx_v__newname));
 
 3309   __Pyx_XDECREF(__pyx_r);
 
 3310   __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3311   __Pyx_GOTREF(__pyx_t_4);
 
 3312   __pyx_r = __pyx_t_4;
 
 3326   __Pyx_XDECREF(__pyx_t_4);
 
 3327   __Pyx_XDECREF(__pyx_t_5);
 
 3328   __Pyx_AddTraceback(
"sioninter.sion_paropen_mpi", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 3331   __Pyx_XDECREF(__pyx_v_fname_b);
 
 3332   __Pyx_XDECREF(__pyx_v_file_mode_b);
 
 3333   __Pyx_XDECREF(__pyx_v_comm);
 
 3334   __Pyx_XDECREF(__pyx_v_rank);
 
 3335   __Pyx_XGIVEREF(__pyx_r);
 
 3336   __Pyx_RefNannyFinishContext();
 
 3348 static PyObject *__pyx_f_9sioninter_sion_parclose_mpi(PyObject *__pyx_v_sid) {
 
 3350   PyObject *__pyx_r = NULL;
 
 3351   __Pyx_RefNannyDeclarations
 
 3353   PyObject *__pyx_t_2 = NULL;
 
 3354   int __pyx_lineno = 0;
 
 3355   const char *__pyx_filename = NULL;
 
 3356   int __pyx_clineno = 0;
 
 3357   __Pyx_RefNannySetupContext(
"sion_parclose_mpi", 0);
 
 3366   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_sid); 
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3376   __Pyx_XDECREF(__pyx_r);
 
 3377   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3378   __Pyx_GOTREF(__pyx_t_2);
 
 3379   __pyx_r = __pyx_t_2;
 
 3393   __Pyx_XDECREF(__pyx_t_2);
 
 3394   __Pyx_AddTraceback(
"sioninter.sion_parclose_mpi", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 3397   __Pyx_XGIVEREF(__pyx_r);
 
 3398   __Pyx_RefNannyFinishContext();
 
 3410 static PyObject *__pyx_f_9sioninter_sion_fwrite(PyObject *__pyx_v_data, PyObject *__pyx_v_sid) {
 
 3411   char *__pyx_v__data;
 
 3412   size_t __pyx_v_bytes_written;
 
 3413   PyObject *__pyx_r = NULL;
 
 3414   __Pyx_RefNannyDeclarations
 
 3416   PyObject *__pyx_t_2 = NULL;
 
 3418   Py_ssize_t __pyx_t_4;
 
 3420   int __pyx_lineno = 0;
 
 3421   const char *__pyx_filename = NULL;
 
 3422   int __pyx_clineno = 0;
 
 3423   __Pyx_RefNannySetupContext(
"sion_fwrite", 0);
 
 3432   __pyx_v__data = NULL;
 
 3441   __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_data); 
if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3442   __pyx_v__data = __pyx_t_1;
 
 3451   __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_SIZE); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3452   __Pyx_GOTREF(__pyx_t_2);
 
 3453   __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); 
if (unlikely((__pyx_t_3 == (
size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3454   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
 3455   __pyx_t_4 = PyObject_Length(__pyx_v_data); 
if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3456   __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_sid); 
if (unlikely((__pyx_t_5 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3457   __pyx_v_bytes_written = 
sion_fwrite(__pyx_v__data, __pyx_t_3, __pyx_t_4, __pyx_t_5);
 
 3466   __Pyx_XDECREF(__pyx_r);
 
 3467   __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_bytes_written); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3468   __Pyx_GOTREF(__pyx_t_2);
 
 3469   __pyx_r = __pyx_t_2;
 
 3483   __Pyx_XDECREF(__pyx_t_2);
 
 3484   __Pyx_AddTraceback(
"sioninter.sion_fwrite", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 3487   __Pyx_XGIVEREF(__pyx_r);
 
 3488   __Pyx_RefNannyFinishContext();
 
 3500 static PyObject *__pyx_f_9sioninter_sion_fread(PyObject *__pyx_v_sid, 
struct __pyx_opt_args_9sioninter_sion_fread *__pyx_optional_args) {
 
 3501   PyObject *__pyx_v_nitems = __pyx_k__10;
 
 3502   size_t __pyx_v__size;
 
 3503   size_t __pyx_v__nitems;
 
 3504   PyObject *__pyx_v_arr = NULL;
 
 3505   size_t __pyx_v_bytes_read;
 
 3506   PyObject *__pyx_r = NULL;
 
 3507   __Pyx_RefNannyDeclarations
 
 3508   PyObject *__pyx_t_1 = NULL;
 
 3510   PyObject *__pyx_t_3 = NULL;
 
 3511   PyObject *__pyx_t_4 = NULL;
 
 3515   Py_ssize_t __pyx_t_8;
 
 3518   int __pyx_lineno = 0;
 
 3519   const char *__pyx_filename = NULL;
 
 3520   int __pyx_clineno = 0;
 
 3521   __Pyx_RefNannySetupContext(
"sion_fread", 0);
 
 3522   if (__pyx_optional_args) {
 
 3523     if (__pyx_optional_args->__pyx_n > 0) {
 
 3524       __pyx_v_nitems = __pyx_optional_args->nitems;
 
 3535   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_SIZE); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3536   __Pyx_GOTREF(__pyx_t_1);
 
 3537   __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_t_1); 
if (unlikely((__pyx_t_2 == (
size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3538   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 3539   __pyx_v__size = __pyx_t_2;
 
 3548   __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_nitems); 
if (unlikely((__pyx_t_2 == (
size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3549   __pyx_v__nitems = __pyx_t_2;
 
 3558   __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v__nitems); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3559   __Pyx_GOTREF(__pyx_t_1);
 
 3560   __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_NITEMS); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3561   __Pyx_GOTREF(__pyx_t_3);
 
 3562   __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3563   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 3564   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
 3565   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); 
if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3566   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 3576     __pyx_t_4 = __pyx_f_9sioninter_sion_bytes_avail_in_chunk(__pyx_v_sid); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3577     __Pyx_GOTREF(__pyx_t_4);
 
 3578     __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_t_4); 
if (unlikely((__pyx_t_2 == (
size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3579     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 3580     __pyx_v__nitems = __pyx_t_2;
 
 3592   __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v__nitems); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3593   __Pyx_GOTREF(__pyx_t_4);
 
 3594   __pyx_t_3 = PyTuple_New(1); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3595   __Pyx_GOTREF(__pyx_t_3);
 
 3596   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
 
 3597   __Pyx_GIVEREF(__pyx_t_4);
 
 3599   __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyByteArray_Type))), __pyx_t_3, NULL); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3600   __Pyx_GOTREF(__pyx_t_4);
 
 3601   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
 3602   __pyx_v_arr = ((PyObject*)__pyx_t_4);
 
 3612   __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_arr); 
if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3613   __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_sid); 
if (unlikely((__pyx_t_7 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3614   __pyx_v_bytes_read = 
sion_fread(((
char *)__pyx_t_6), __pyx_v__size, __pyx_v__nitems, __pyx_t_7);
 
 3623   __pyx_t_8 = PyObject_Length(__pyx_v_arr); 
if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3624   __pyx_t_5 = ((__pyx_v_bytes_read != __pyx_t_8) != 0);
 
 3626     __pyx_t_9 = ((__pyx_v_bytes_read != (__pyx_v__size * __pyx_v__nitems)) != 0);
 
 3627     __pyx_t_10 = __pyx_t_9;
 
 3629     __pyx_t_10 = __pyx_t_5;
 
 3640     __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__11, NULL); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3641     __Pyx_GOTREF(__pyx_t_4);
 
 3642     __Pyx_Raise(__pyx_t_4, 0, 0, 0);
 
 3643     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 3644     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3654   __Pyx_XDECREF(__pyx_r);
 
 3655   __Pyx_INCREF(__pyx_v_arr);
 
 3656   __pyx_r = __pyx_v_arr;
 
 3669   __Pyx_XDECREF(__pyx_t_1);
 
 3670   __Pyx_XDECREF(__pyx_t_3);
 
 3671   __Pyx_XDECREF(__pyx_t_4);
 
 3672   __Pyx_AddTraceback(
"sioninter.sion_fread", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 3675   __Pyx_XDECREF(__pyx_v_arr);
 
 3676   __Pyx_XGIVEREF(__pyx_r);
 
 3677   __Pyx_RefNannyFinishContext();
 
 3689 static PyObject *__pyx_f_9sioninter_sion_bytes_avail_in_chunk(PyObject *__pyx_v_sid) {
 
 3690   __pyx_t_10csioninter_sion_int64 __pyx_v_ret;
 
 3691   PyObject *__pyx_r = NULL;
 
 3692   __Pyx_RefNannyDeclarations
 
 3694   PyObject *__pyx_t_2 = NULL;
 
 3695   int __pyx_lineno = 0;
 
 3696   const char *__pyx_filename = NULL;
 
 3697   int __pyx_clineno = 0;
 
 3698   __Pyx_RefNannySetupContext(
"sion_bytes_avail_in_chunk", 0);
 
 3707   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_sid); 
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3717   __Pyx_XDECREF(__pyx_r);
 
 3718   __pyx_t_2 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_ret); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3719   __Pyx_GOTREF(__pyx_t_2);
 
 3720   __pyx_r = __pyx_t_2;
 
 3734   __Pyx_XDECREF(__pyx_t_2);
 
 3735   __Pyx_AddTraceback(
"sioninter.sion_bytes_avail_in_chunk", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 3738   __Pyx_XGIVEREF(__pyx_r);
 
 3739   __Pyx_RefNannyFinishContext();
 
 3751 static PyObject *__pyx_pw_9sioninter_3sion_fwrite_key(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); 
 
 3752 static PyObject *__pyx_f_9sioninter_sion_fwrite_key(PyObject *__pyx_v_data, PyObject *__pyx_v_key, PyObject *__pyx_v_sid, CYTHON_UNUSED 
int __pyx_skip_dispatch) {
 
 3753   char *__pyx_v__data;
 
 3755   PyObject *__pyx_r = NULL;
 
 3756   __Pyx_RefNannyDeclarations
 
 3759   PyObject *__pyx_t_3 = NULL;
 
 3761   Py_ssize_t __pyx_t_5;
 
 3763   int __pyx_lineno = 0;
 
 3764   const char *__pyx_filename = NULL;
 
 3765   int __pyx_clineno = 0;
 
 3766   __Pyx_RefNannySetupContext(
"sion_fwrite_key", 0);
 
 3775   __pyx_v__data = NULL;
 
 3784   __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_data); 
if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3785   __pyx_v__data = __pyx_t_1;
 
 3794   __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_v_key); 
if (unlikely((__pyx_t_2 == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3795   __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_SIZE); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3796   __Pyx_GOTREF(__pyx_t_3);
 
 3797   __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_3); 
if (unlikely((__pyx_t_4 == (
size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3798   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
 3799   __pyx_t_5 = PyObject_Length(__pyx_v_data); 
if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3800   __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_sid); 
if (unlikely((__pyx_t_6 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3801   __pyx_v_ret = 
sion_fwrite_key(__pyx_v__data, __pyx_t_2, __pyx_t_4, __pyx_t_5, __pyx_t_6);
 
 3810   __Pyx_XDECREF(__pyx_r);
 
 3811   __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_ret); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3812   __Pyx_GOTREF(__pyx_t_3);
 
 3813   __pyx_r = __pyx_t_3;
 
 3827   __Pyx_XDECREF(__pyx_t_3);
 
 3828   __Pyx_AddTraceback(
"sioninter.sion_fwrite_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 3831   __Pyx_XGIVEREF(__pyx_r);
 
 3832   __Pyx_RefNannyFinishContext();
 
 3837 static PyObject *__pyx_pw_9sioninter_3sion_fwrite_key(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); 
 
 3838 static char __pyx_doc_9sioninter_2sion_fwrite_key[] = 
"Write a key value pair.";
 
 3839 static PyObject *__pyx_pw_9sioninter_3sion_fwrite_key(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
 3840   PyObject *__pyx_v_data = 0;
 
 3841   PyObject *__pyx_v_key = 0;
 
 3842   PyObject *__pyx_v_sid = 0;
 
 3843   int __pyx_lineno = 0;
 
 3844   const char *__pyx_filename = NULL;
 
 3845   int __pyx_clineno = 0;
 
 3846   PyObject *__pyx_r = 0;
 
 3847   __Pyx_RefNannyDeclarations
 
 3848   __Pyx_RefNannySetupContext(
"sion_fwrite_key (wrapper)", 0);
 
 3850     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_key,&__pyx_n_s_sid_2,0};
 
 3851     PyObject* values[3] = {0,0,0};
 
 3852     if (unlikely(__pyx_kwds)) {
 
 3854       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
 
 3856         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
 3857         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 3858         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 3860         default: 
goto __pyx_L5_argtuple_error;
 
 3862       kw_args = PyDict_Size(__pyx_kwds);
 
 3865         if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
 
 3866         else goto __pyx_L5_argtuple_error;
 
 3868         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
 
 3870           __Pyx_RaiseArgtupleInvalid(
"sion_fwrite_key", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 3873         if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sid_2)) != 0)) kw_args--;
 
 3875           __Pyx_RaiseArgtupleInvalid(
"sion_fwrite_key", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 3878       if (unlikely(kw_args > 0)) {
 
 3879         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, 
"sion_fwrite_key") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 3881     } 
else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
 
 3882       goto __pyx_L5_argtuple_error;
 
 3884       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 3885       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 3886       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
 3888     __pyx_v_data = values[0];
 
 3889     __pyx_v_key = values[1];
 
 3890     __pyx_v_sid = values[2];
 
 3892   goto __pyx_L4_argument_unpacking_done;
 
 3893   __pyx_L5_argtuple_error:;
 
 3894   __Pyx_RaiseArgtupleInvalid(
"sion_fwrite_key", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 3896   __Pyx_AddTraceback(
"sioninter.sion_fwrite_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 3897   __Pyx_RefNannyFinishContext();
 
 3899   __pyx_L4_argument_unpacking_done:;
 
 3900   __pyx_r = __pyx_pf_9sioninter_2sion_fwrite_key(__pyx_self, __pyx_v_data, __pyx_v_key, __pyx_v_sid);
 
 3903   __Pyx_RefNannyFinishContext();
 
 3907 static PyObject *__pyx_pf_9sioninter_2sion_fwrite_key(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_key, PyObject *__pyx_v_sid) {
 
 3908   PyObject *__pyx_r = NULL;
 
 3909   __Pyx_RefNannyDeclarations
 
 3910   PyObject *__pyx_t_1 = NULL;
 
 3911   int __pyx_lineno = 0;
 
 3912   const char *__pyx_filename = NULL;
 
 3913   int __pyx_clineno = 0;
 
 3914   __Pyx_RefNannySetupContext(
"sion_fwrite_key", 0);
 
 3915   __Pyx_XDECREF(__pyx_r);
 
 3916   __pyx_t_1 = __pyx_f_9sioninter_sion_fwrite_key(__pyx_v_data, __pyx_v_key, __pyx_v_sid, 0); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3917   __Pyx_GOTREF(__pyx_t_1);
 
 3918   __pyx_r = __pyx_t_1;
 
 3924   __Pyx_XDECREF(__pyx_t_1);
 
 3925   __Pyx_AddTraceback(
"sioninter.sion_fwrite_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 3928   __Pyx_XGIVEREF(__pyx_r);
 
 3929   __Pyx_RefNannyFinishContext();
 
 3941 static PyObject *__pyx_pw_9sioninter_5sion_fread_key(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); 
 
 3942 static PyObject *__pyx_f_9sioninter_sion_fread_key(PyObject *__pyx_v_key, PyObject *__pyx_v_sid, CYTHON_UNUSED 
int __pyx_skip_dispatch, 
struct __pyx_opt_args_9sioninter_sion_fread_key *__pyx_optional_args) {
 
 3943   PyObject *__pyx_v_nitems = __pyx_k__12;
 
 3944   size_t __pyx_v__size;
 
 3945   size_t __pyx_v__nitems;
 
 3946   PyObject *__pyx_v_arr = NULL;
 
 3947   size_t __pyx_v_bytes_read;
 
 3948   PyObject *__pyx_r = NULL;
 
 3949   __Pyx_RefNannyDeclarations
 
 3950   PyObject *__pyx_t_1 = NULL;
 
 3952   PyObject *__pyx_t_3 = NULL;
 
 3953   PyObject *__pyx_t_4 = NULL;
 
 3958   Py_ssize_t __pyx_t_9;
 
 3961   PyObject *__pyx_t_12 = NULL;
 
 3962   PyObject *__pyx_t_13 = NULL;
 
 3963   int __pyx_lineno = 0;
 
 3964   const char *__pyx_filename = NULL;
 
 3965   int __pyx_clineno = 0;
 
 3966   __Pyx_RefNannySetupContext(
"sion_fread_key", 0);
 
 3967   if (__pyx_optional_args) {
 
 3968     if (__pyx_optional_args->__pyx_n > 0) {
 
 3969       __pyx_v_nitems = __pyx_optional_args->nitems;
 
 3980   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_SIZE); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3981   __Pyx_GOTREF(__pyx_t_1);
 
 3982   __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_t_1); 
if (unlikely((__pyx_t_2 == (
size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3983   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 3984   __pyx_v__size = __pyx_t_2;
 
 3993   __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_nitems); 
if (unlikely((__pyx_t_2 == (
size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 3994   __pyx_v__nitems = __pyx_t_2;
 
 4003   __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v__nitems); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4004   __Pyx_GOTREF(__pyx_t_1);
 
 4005   __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_NITEMS); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4006   __Pyx_GOTREF(__pyx_t_3);
 
 4007   __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4008   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 4009   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
 4010   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); 
if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4011   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 4021     __pyx_t_4 = __pyx_f_9sioninter_sion_bytes_avail_in_chunk(__pyx_v_sid); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4022     __Pyx_GOTREF(__pyx_t_4);
 
 4023     __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_t_4); 
if (unlikely((__pyx_t_2 == (
size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4024     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 4025     __pyx_v__nitems = __pyx_t_2;
 
 4037   __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v__nitems); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4038   __Pyx_GOTREF(__pyx_t_4);
 
 4039   __pyx_t_3 = PyTuple_New(1); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4040   __Pyx_GOTREF(__pyx_t_3);
 
 4041   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
 
 4042   __Pyx_GIVEREF(__pyx_t_4);
 
 4044   __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyByteArray_Type))), __pyx_t_3, NULL); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4045   __Pyx_GOTREF(__pyx_t_4);
 
 4046   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
 4047   __pyx_v_arr = ((PyObject*)__pyx_t_4);
 
 4057   __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_arr); 
if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4058   __pyx_t_7 = __Pyx_PyInt_As_uint64_t(__pyx_v_key); 
if (unlikely((__pyx_t_7 == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4067   __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_sid); 
if (unlikely((__pyx_t_8 == (
int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4076   __pyx_v_bytes_read = 
sion_fread_key(((
char *)__pyx_t_6), __pyx_t_7, __pyx_v__size, __pyx_v__nitems, __pyx_t_8);
 
 4085   __pyx_t_9 = PyObject_Length(__pyx_v_arr); 
if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4086   __pyx_t_5 = ((__pyx_v_bytes_read != __pyx_t_9) != 0);
 
 4088     __pyx_t_10 = ((__pyx_v_bytes_read != (__pyx_v__size * __pyx_v__nitems)) != 0);
 
 4089     __pyx_t_11 = __pyx_t_10;
 
 4091     __pyx_t_11 = __pyx_t_5;
 
 4102     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_read_not_successful_2, __pyx_n_s_format); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4103     __Pyx_GOTREF(__pyx_t_4);
 
 4104     __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_bytes_read); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4105     __Pyx_GOTREF(__pyx_t_3);
 
 4114     __pyx_t_9 = PyObject_Length(__pyx_v_arr); 
if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4115     __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_9); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4116     __Pyx_GOTREF(__pyx_t_1);
 
 4125     __pyx_t_12 = __Pyx_PyInt_FromSize_t((__pyx_v__size * __pyx_v__nitems)); 
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4126     __Pyx_GOTREF(__pyx_t_12);
 
 4135     __pyx_t_13 = PyTuple_New(3); 
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4136     __Pyx_GOTREF(__pyx_t_13);
 
 4137     PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_3);
 
 4138     __Pyx_GIVEREF(__pyx_t_3);
 
 4139     PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_1);
 
 4140     __Pyx_GIVEREF(__pyx_t_1);
 
 4141     PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_12);
 
 4142     __Pyx_GIVEREF(__pyx_t_12);
 
 4146     __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); 
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4147     __Pyx_GOTREF(__pyx_t_12);
 
 4148     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 4149     __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
 
 4150     __pyx_t_13 = PyTuple_New(1); 
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4151     __Pyx_GOTREF(__pyx_t_13);
 
 4152     PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12);
 
 4153     __Pyx_GIVEREF(__pyx_t_12);
 
 4155     __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_13, NULL); 
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4156     __Pyx_GOTREF(__pyx_t_12);
 
 4157     __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
 
 4158     __Pyx_Raise(__pyx_t_12, 0, 0, 0);
 
 4159     __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
 4160     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4168   __Pyx_XDECREF(__pyx_r);
 
 4169   __Pyx_INCREF(__pyx_v_arr);
 
 4170   __pyx_r = __pyx_v_arr;
 
 4183   __Pyx_XDECREF(__pyx_t_1);
 
 4184   __Pyx_XDECREF(__pyx_t_3);
 
 4185   __Pyx_XDECREF(__pyx_t_4);
 
 4186   __Pyx_XDECREF(__pyx_t_12);
 
 4187   __Pyx_XDECREF(__pyx_t_13);
 
 4188   __Pyx_AddTraceback(
"sioninter.sion_fread_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 4191   __Pyx_XDECREF(__pyx_v_arr);
 
 4192   __Pyx_XGIVEREF(__pyx_r);
 
 4193   __Pyx_RefNannyFinishContext();
 
 4198 static PyObject *__pyx_pw_9sioninter_5sion_fread_key(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); 
 
 4199 static char __pyx_doc_9sioninter_4sion_fread_key[] = 
"Read value for corresponding key.";
 
 4200 static PyObject *__pyx_pw_9sioninter_5sion_fread_key(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
 4201   PyObject *__pyx_v_key = 0;
 
 4202   PyObject *__pyx_v_sid = 0;
 
 4203   PyObject *__pyx_v_nitems = 0;
 
 4204   int __pyx_lineno = 0;
 
 4205   const char *__pyx_filename = NULL;
 
 4206   int __pyx_clineno = 0;
 
 4207   PyObject *__pyx_r = 0;
 
 4208   __Pyx_RefNannyDeclarations
 
 4209   __Pyx_RefNannySetupContext(
"sion_fread_key (wrapper)", 0);
 
 4211     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_sid_2,&__pyx_n_s_nitems,0};
 
 4212     PyObject* values[3] = {0,0,0};
 
 4213     values[2] = __pyx_k__12;
 
 4214     if (unlikely(__pyx_kwds)) {
 
 4216       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
 
 4218         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
 4219         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 4220         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 4222         default: 
goto __pyx_L5_argtuple_error;
 
 4224       kw_args = PyDict_Size(__pyx_kwds);
 
 4227         if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
 
 4228         else goto __pyx_L5_argtuple_error;
 
 4230         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sid_2)) != 0)) kw_args--;
 
 4232           __Pyx_RaiseArgtupleInvalid(
"sion_fread_key", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 4236           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nitems);
 
 4237           if (value) { values[2] = value; kw_args--; }
 
 4240       if (unlikely(kw_args > 0)) {
 
 4241         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, 
"sion_fread_key") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 4244       switch (PyTuple_GET_SIZE(__pyx_args)) {
 
 4245         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
 4246         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
 4247         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
 4249         default: 
goto __pyx_L5_argtuple_error;
 
 4252     __pyx_v_key = values[0];
 
 4253     __pyx_v_sid = values[1];
 
 4254     __pyx_v_nitems = values[2];
 
 4256   goto __pyx_L4_argument_unpacking_done;
 
 4257   __pyx_L5_argtuple_error:;
 
 4258   __Pyx_RaiseArgtupleInvalid(
"sion_fread_key", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; 
goto __pyx_L3_error;}
 
 4260   __Pyx_AddTraceback(
"sioninter.sion_fread_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 4261   __Pyx_RefNannyFinishContext();
 
 4263   __pyx_L4_argument_unpacking_done:;
 
 4264   __pyx_r = __pyx_pf_9sioninter_4sion_fread_key(__pyx_self, __pyx_v_key, __pyx_v_sid, __pyx_v_nitems);
 
 4267   __Pyx_RefNannyFinishContext();
 
 4271 static PyObject *__pyx_pf_9sioninter_4sion_fread_key(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_key, PyObject *__pyx_v_sid, PyObject *__pyx_v_nitems) {
 
 4272   PyObject *__pyx_r = NULL;
 
 4273   __Pyx_RefNannyDeclarations
 
 4274   PyObject *__pyx_t_1 = NULL;
 
 4275   struct __pyx_opt_args_9sioninter_sion_fread_key __pyx_t_2;
 
 4276   int __pyx_lineno = 0;
 
 4277   const char *__pyx_filename = NULL;
 
 4278   int __pyx_clineno = 0;
 
 4279   __Pyx_RefNannySetupContext(
"sion_fread_key", 0);
 
 4280   __Pyx_XDECREF(__pyx_r);
 
 4281   __pyx_t_2.__pyx_n = 1;
 
 4282   __pyx_t_2.nitems = __pyx_v_nitems;
 
 4283   __pyx_t_1 = __pyx_f_9sioninter_sion_fread_key(__pyx_v_key, __pyx_v_sid, 0, &__pyx_t_2); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4284   __Pyx_GOTREF(__pyx_t_1);
 
 4285   __pyx_r = __pyx_t_1;
 
 4291   __Pyx_XDECREF(__pyx_t_1);
 
 4292   __Pyx_AddTraceback(
"sioninter.sion_fread_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 4295   __Pyx_XGIVEREF(__pyx_r);
 
 4296   __Pyx_RefNannyFinishContext();
 
 4309 static CYTHON_UNUSED 
int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, 
int __pyx_v_flags); 
 
 4310 static CYTHON_UNUSED 
int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, 
int __pyx_v_flags) {
 
 4312   __Pyx_RefNannyDeclarations
 
 4313   __Pyx_RefNannySetupContext(
"__getbuffer__ (wrapper)", 0);
 
 4314   __pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((
int)__pyx_v_flags));
 
 4317   __Pyx_RefNannyFinishContext();
 
 4321 static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED 
int __pyx_v_flags) {
 
 4322   PyObject *__pyx_v_item_count = NULL;
 
 4324   __Pyx_RefNannyDeclarations
 
 4325   PyObject *__pyx_t_1 = NULL;
 
 4328   PyObject *__pyx_t_4 = NULL;
 
 4329   Py_ssize_t __pyx_t_5;
 
 4331   int __pyx_lineno = 0;
 
 4332   const char *__pyx_filename = NULL;
 
 4333   int __pyx_clineno = 0;
 
 4334   __Pyx_RefNannySetupContext(
"__getbuffer__", 0);
 
 4335   if (__pyx_v_info != NULL) {
 
 4336     __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
 
 4337     __Pyx_GIVEREF(__pyx_v_info->obj);
 
 4347   __pyx_t_1 = PyInt_FromSsize_t(Py_SIZE(((PyObject *)__pyx_v_self))); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4348   __Pyx_GOTREF(__pyx_t_1);
 
 4349   __pyx_v_item_count = __pyx_t_1;
 
 4359   __pyx_v_info->suboffsets = NULL;
 
 4368   __pyx_t_2 = __pyx_v_self->data.as_chars;
 
 4369   __pyx_v_info->buf = __pyx_t_2;
 
 4378   __pyx_v_info->readonly = 0;
 
 4387   __pyx_v_info->ndim = 1;
 
 4396   __pyx_t_3 = __pyx_v_self->ob_descr->itemsize;
 
 4397   __pyx_v_info->itemsize = __pyx_t_3;
 
 4406   __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4407   __Pyx_GOTREF(__pyx_t_1);
 
 4408   __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_item_count); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4409   __Pyx_GOTREF(__pyx_t_4);
 
 4410   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 4411   __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); 
if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4412   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 4413   __pyx_v_info->len = __pyx_t_5;
 
 4422   __pyx_v_info->shape = ((Py_ssize_t *)PyMem_Malloc(((
sizeof(Py_ssize_t)) + 2)));
 
 4431   __pyx_t_6 = ((!(__pyx_v_info->shape != 0)) != 0);
 
 4441     PyErr_NoMemory(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4451   __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_item_count); 
if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4452   (__pyx_v_info->shape[0]) = __pyx_t_5;
 
 4461   __pyx_v_info->strides = (&__pyx_v_info->itemsize);
 
 4470   __pyx_v_info->format = ((
char *)(__pyx_v_info->shape + 1));
 
 4479   __pyx_t_3 = __pyx_v_self->ob_descr->typecode;
 
 4480   (__pyx_v_info->format[0]) = __pyx_t_3;
 
 4489   (__pyx_v_info->format[1]) = 0;
 
 4498   __Pyx_INCREF(((PyObject *)__pyx_v_self));
 
 4499   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
 
 4500   __Pyx_GOTREF(__pyx_v_info->obj);
 
 4501   __Pyx_DECREF(__pyx_v_info->obj);
 
 4502   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
 
 4516   __Pyx_XDECREF(__pyx_t_1);
 
 4517   __Pyx_XDECREF(__pyx_t_4);
 
 4518   __Pyx_AddTraceback(
"cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 4520   if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
 
 4521     __Pyx_GOTREF(__pyx_v_info->obj);
 
 4522     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
 
 4526   if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
 
 4527     __Pyx_GOTREF(Py_None);
 
 4528     __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
 
 4531   __Pyx_XDECREF(__pyx_v_item_count);
 
 4532   __Pyx_RefNannyFinishContext();
 
 4545 static CYTHON_UNUSED 
void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); 
 
 4546 static CYTHON_UNUSED 
void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
 
 4547   __Pyx_RefNannyDeclarations
 
 4548   __Pyx_RefNannySetupContext(
"__releasebuffer__ (wrapper)", 0);
 
 4549   __pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
 
 4552   __Pyx_RefNannyFinishContext();
 
 4555 static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) {
 
 4556   __Pyx_RefNannyDeclarations
 
 4557   __Pyx_RefNannySetupContext(
"__releasebuffer__", 0);
 
 4566   PyMem_Free(__pyx_v_info->shape);
 
 4577   __Pyx_RefNannyFinishContext();
 
 4588 static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__pyx_v_template, Py_ssize_t __pyx_v_length, 
int __pyx_v_zero) {
 
 4589   arrayobject *__pyx_v_op = NULL;
 
 4590   arrayobject *__pyx_r = NULL;
 
 4591   __Pyx_RefNannyDeclarations
 
 4592   PyObject *__pyx_t_1 = NULL;
 
 4595   int __pyx_lineno = 0;
 
 4596   const char *__pyx_filename = NULL;
 
 4597   int __pyx_clineno = 0;
 
 4598   __Pyx_RefNannySetupContext(
"clone", 0);
 
 4607   __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_template)), __pyx_v_length, __pyx_v_template->ob_descr)); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4608   __Pyx_GOTREF(__pyx_t_1);
 
 4609   __pyx_v_op = ((arrayobject *)__pyx_t_1);
 
 4619   if ((__pyx_v_zero != 0)) {
 
 4620     __pyx_t_2 = (((PyObject *)__pyx_v_op) != Py_None);
 
 4621     __pyx_t_3 = (__pyx_t_2 != 0);
 
 4623     __pyx_t_3 = (__pyx_v_zero != 0);
 
 4634     memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize));
 
 4646   __Pyx_XDECREF(((PyObject *)__pyx_r));
 
 4647   __Pyx_INCREF(((PyObject *)__pyx_v_op));
 
 4648   __pyx_r = __pyx_v_op;
 
 4661   __Pyx_XDECREF(__pyx_t_1);
 
 4662   __Pyx_AddTraceback(
"cpython.array.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 4665   __Pyx_XDECREF((PyObject *)__pyx_v_op);
 
 4666   __Pyx_XGIVEREF((PyObject *)__pyx_r);
 
 4667   __Pyx_RefNannyFinishContext();
 
 4679 static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) {
 
 4680   arrayobject *__pyx_v_op = NULL;
 
 4681   arrayobject *__pyx_r = NULL;
 
 4682   __Pyx_RefNannyDeclarations
 
 4683   PyObject *__pyx_t_1 = NULL;
 
 4684   int __pyx_lineno = 0;
 
 4685   const char *__pyx_filename = NULL;
 
 4686   int __pyx_clineno = 0;
 
 4687   __Pyx_RefNannySetupContext(
"copy", 0);
 
 4696   __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_self)), Py_SIZE(((PyObject *)__pyx_v_self)), __pyx_v_self->ob_descr)); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4697   __Pyx_GOTREF(__pyx_t_1);
 
 4698   __pyx_v_op = ((arrayobject *)__pyx_t_1);
 
 4708   memcpy(__pyx_v_op->data.as_chars, __pyx_v_self->data.as_chars, (Py_SIZE(((PyObject *)__pyx_v_op)) * __pyx_v_op->ob_descr->itemsize));
 
 4717   __Pyx_XDECREF(((PyObject *)__pyx_r));
 
 4718   __Pyx_INCREF(((PyObject *)__pyx_v_op));
 
 4719   __pyx_r = __pyx_v_op;
 
 4732   __Pyx_XDECREF(__pyx_t_1);
 
 4733   __Pyx_AddTraceback(
"cpython.array.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 4736   __Pyx_XDECREF((PyObject *)__pyx_v_op);
 
 4737   __Pyx_XGIVEREF((PyObject *)__pyx_r);
 
 4738   __Pyx_RefNannyFinishContext();
 
 4750 static CYTHON_INLINE 
int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__pyx_v_self, 
char *__pyx_v_stuff, Py_ssize_t __pyx_v_n) {
 
 4751   Py_ssize_t __pyx_v_itemsize;
 
 4752   Py_ssize_t __pyx_v_origsize;
 
 4754   __Pyx_RefNannyDeclarations
 
 4756   int __pyx_lineno = 0;
 
 4757   const char *__pyx_filename = NULL;
 
 4758   int __pyx_clineno = 0;
 
 4759   __Pyx_RefNannySetupContext(
"extend_buffer", 0);
 
 4768   __pyx_t_1 = __pyx_v_self->ob_descr->itemsize;
 
 4769   __pyx_v_itemsize = __pyx_t_1;
 
 4778   __pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self));
 
 4787   __pyx_t_1 = resize_smart(__pyx_v_self, (__pyx_v_origsize + __pyx_v_n)); 
if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4796   memcpy((__pyx_v_self->data.as_chars + (__pyx_v_origsize * __pyx_v_itemsize)), __pyx_v_stuff, (__pyx_v_n * __pyx_v_itemsize));
 
 4818   __Pyx_AddTraceback(
"cpython.array.extend_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 4821   __Pyx_RefNannyFinishContext();
 
 4833 static CYTHON_INLINE 
int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) {
 
 4835   __Pyx_RefNannyDeclarations
 
 4838   int __pyx_lineno = 0;
 
 4839   const char *__pyx_filename = NULL;
 
 4840   int __pyx_clineno = 0;
 
 4841   __Pyx_RefNannySetupContext(
"extend", 0);
 
 4850   __pyx_t_1 = ((__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode) != 0);
 
 4860     __pyx_t_2 = PyErr_BadArgument(); 
if (unlikely(__pyx_t_2 == 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4872   __pyx_t_2 = __pyx_f_7cpython_5array_extend_buffer(__pyx_v_self, __pyx_v_other->data.as_chars, Py_SIZE(((PyObject *)__pyx_v_other))); 
if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 4873   __pyx_r = __pyx_t_2;
 
 4886   __Pyx_AddTraceback(
"cpython.array.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 4889   __Pyx_RefNannyFinishContext();
 
 4901 static CYTHON_INLINE 
void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) {
 
 4902   __Pyx_RefNannyDeclarations
 
 4903   __Pyx_RefNannySetupContext(
"zero", 0);
 
 4910   memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self)) * __pyx_v_self->ob_descr->itemsize));
 
 4921   __Pyx_RefNannyFinishContext();
 
 4924 static PyMethodDef __pyx_methods[] = {
 
 4925   {__Pyx_NAMESTR(
"sion_fwrite_key"), (PyCFunction)__pyx_pw_9sioninter_3sion_fwrite_key, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9sioninter_2sion_fwrite_key)},
 
 4926   {__Pyx_NAMESTR(
"sion_fread_key"), (PyCFunction)__pyx_pw_9sioninter_5sion_fread_key, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9sioninter_4sion_fread_key)},
 
 4930 #if PY_MAJOR_VERSION >= 3 
 4931 static struct PyModuleDef __pyx_moduledef = {
 
 4932   #if PY_VERSION_HEX < 0x03020000 
 4933     { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
 
 4935     PyModuleDef_HEAD_INIT,
 
 4937     __Pyx_NAMESTR(
"sioninter"),
 
 4938     __Pyx_DOCSTR(__pyx_k_Interface_for_SIONlib_This_inter), 
 
 4948 static __Pyx_StringTabEntry __pyx_string_tab[] = {
 
 4949   {&__pyx_kp_u_, __pyx_k_, 
sizeof(__pyx_k_), 0, 1, 0, 0},
 
 4950   {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, 
sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
 
 4951   {&__pyx_n_s_BufferedIOBase, __pyx_k_BufferedIOBase, 
sizeof(__pyx_k_BufferedIOBase), 0, 0, 1, 1},
 
 4952   {&__pyx_n_s_COMM_WORLD, __pyx_k_COMM_WORLD, 
sizeof(__pyx_k_COMM_WORLD), 0, 0, 1, 1},
 
 4953   {&__pyx_n_s_DEFAULT_CHUNKSIZE, __pyx_k_DEFAULT_CHUNKSIZE, 
sizeof(__pyx_k_DEFAULT_CHUNKSIZE), 0, 0, 1, 1},
 
 4954   {&__pyx_n_s_DEFAULT_CHUNKSIZES, __pyx_k_DEFAULT_CHUNKSIZES, 
sizeof(__pyx_k_DEFAULT_CHUNKSIZES), 0, 0, 1, 1},
 
 4955   {&__pyx_n_s_DEFAULT_FILEPTR, __pyx_k_DEFAULT_FILEPTR, 
sizeof(__pyx_k_DEFAULT_FILEPTR), 0, 0, 1, 1},
 
 4956   {&__pyx_n_s_DEFAULT_FSBLKSIZE, __pyx_k_DEFAULT_FSBLKSIZE, 
sizeof(__pyx_k_DEFAULT_FSBLKSIZE), 0, 0, 1, 1},
 
 4957   {&__pyx_n_s_DEFAULT_GCOMM, __pyx_k_DEFAULT_GCOMM, 
sizeof(__pyx_k_DEFAULT_GCOMM), 0, 0, 1, 1},
 
 4958   {&__pyx_n_s_DEFAULT_GLOBALRANK, __pyx_k_DEFAULT_GLOBALRANK, 
sizeof(__pyx_k_DEFAULT_GLOBALRANK), 0, 0, 1, 1},
 
 4959   {&__pyx_n_s_DEFAULT_GLOBALRANKS, __pyx_k_DEFAULT_GLOBALRANKS, 
sizeof(__pyx_k_DEFAULT_GLOBALRANKS), 0, 0, 1, 1},
 
 4960   {&__pyx_n_s_DEFAULT_LCOMM, __pyx_k_DEFAULT_LCOMM, 
sizeof(__pyx_k_DEFAULT_LCOMM), 0, 0, 1, 1},
 
 4961   {&__pyx_n_s_DEFAULT_NFILES, __pyx_k_DEFAULT_NFILES, 
sizeof(__pyx_k_DEFAULT_NFILES), 0, 0, 1, 1},
 
 4962   {&__pyx_n_s_DEFAULT_NITEMS, __pyx_k_DEFAULT_NITEMS, 
sizeof(__pyx_k_DEFAULT_NITEMS), 0, 0, 1, 1},
 
 4963   {&__pyx_n_s_DEFAULT_NTASKS, __pyx_k_DEFAULT_NTASKS, 
sizeof(__pyx_k_DEFAULT_NTASKS), 0, 0, 1, 1},
 
 4964   {&__pyx_n_s_DEFAULT_PAR_MODE, __pyx_k_DEFAULT_PAR_MODE, 
sizeof(__pyx_k_DEFAULT_PAR_MODE), 0, 0, 1, 1},
 
 4965   {&__pyx_n_s_DEFAULT_SIZE, __pyx_k_DEFAULT_SIZE, 
sizeof(__pyx_k_DEFAULT_SIZE), 0, 0, 1, 1},
 
 4966   {&__pyx_kp_s_File_like_object_for_handling_SI, __pyx_k_File_like_object_for_handling_SI, 
sizeof(__pyx_k_File_like_object_for_handling_SI), 0, 0, 1, 0},
 
 4967   {&__pyx_n_s_Get_rank, __pyx_k_Get_rank, 
sizeof(__pyx_k_Get_rank), 0, 0, 1, 1},
 
 4968   {&__pyx_n_s_IOError, __pyx_k_IOError, 
sizeof(__pyx_k_IOError), 0, 0, 1, 1},
 
 4969   {&__pyx_n_s_MPI, __pyx_k_MPI, 
sizeof(__pyx_k_MPI), 0, 0, 1, 1},
 
 4970   {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, 
sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
 
 4971   {&__pyx_n_s_SIONFile, __pyx_k_SIONFile, 
sizeof(__pyx_k_SIONFile), 0, 0, 1, 1},
 
 4972   {&__pyx_n_s_SIONFile___init, __pyx_k_SIONFile___init, 
sizeof(__pyx_k_SIONFile___init), 0, 0, 1, 1},
 
 4973   {&__pyx_n_s_SIONFile_close, __pyx_k_SIONFile_close, 
sizeof(__pyx_k_SIONFile_close), 0, 0, 1, 1},
 
 4974   {&__pyx_n_s_SIONFile_closed, __pyx_k_SIONFile_closed, 
sizeof(__pyx_k_SIONFile_closed), 0, 0, 1, 1},
 
 4975   {&__pyx_n_s_SIONFile_open, __pyx_k_SIONFile_open, 
sizeof(__pyx_k_SIONFile_open), 0, 0, 1, 1},
 
 4976   {&__pyx_n_s_SIONFile_read, __pyx_k_SIONFile_read, 
sizeof(__pyx_k_SIONFile_read), 0, 0, 1, 1},
 
 4977   {&__pyx_n_s_SIONFile_read_key, __pyx_k_SIONFile_read_key, 
sizeof(__pyx_k_SIONFile_read_key), 0, 0, 1, 1},
 
 4978   {&__pyx_n_s_SIONFile_write, __pyx_k_SIONFile_write, 
sizeof(__pyx_k_SIONFile_write), 0, 0, 1, 1},
 
 4979   {&__pyx_n_s_SIONFile_write_key, __pyx_k_SIONFile_write_key, 
sizeof(__pyx_k_SIONFile_write_key), 0, 0, 1, 1},
 
 4980   {&__pyx_n_s_array, __pyx_k_array, 
sizeof(__pyx_k_array), 0, 0, 1, 1},
 
 4981   {&__pyx_n_s_close, __pyx_k_close, 
sizeof(__pyx_k_close), 0, 0, 1, 1},
 
 4982   {&__pyx_n_s_closed, __pyx_k_closed, 
sizeof(__pyx_k_closed), 0, 0, 1, 1},
 
 4983   {&__pyx_n_s_data, __pyx_k_data, 
sizeof(__pyx_k_data), 0, 0, 1, 1},
 
 4984   {&__pyx_n_s_doc, __pyx_k_doc, 
sizeof(__pyx_k_doc), 0, 0, 1, 1},
 
 4985   {&__pyx_n_s_encode, __pyx_k_encode, 
sizeof(__pyx_k_encode), 0, 0, 1, 1},
 
 4986   {&__pyx_n_s_file_mode, __pyx_k_file_mode, 
sizeof(__pyx_k_file_mode), 0, 0, 1, 1},
 
 4987   {&__pyx_n_s_file_mode_2, __pyx_k_file_mode_2, 
sizeof(__pyx_k_file_mode_2), 0, 0, 1, 1},
 
 4988   {&__pyx_n_s_fname, __pyx_k_fname, 
sizeof(__pyx_k_fname), 0, 0, 1, 1},
 
 4989   {&__pyx_n_s_fname_2, __pyx_k_fname_2, 
sizeof(__pyx_k_fname_2), 0, 0, 1, 1},
 
 4990   {&__pyx_n_s_format, __pyx_k_format, 
sizeof(__pyx_k_format), 0, 0, 1, 1},
 
 4991   {&__pyx_kp_s_home_thust_src_sionlib_pythonin, __pyx_k_home_thust_src_sionlib_pythonin, 
sizeof(__pyx_k_home_thust_src_sionlib_pythonin), 0, 0, 1, 0},
 
 4992   {&__pyx_n_s_import, __pyx_k_import, 
sizeof(__pyx_k_import), 0, 0, 1, 1},
 
 4993   {&__pyx_n_s_init, __pyx_k_init, 
sizeof(__pyx_k_init), 0, 0, 1, 1},
 
 4994   {&__pyx_kp_u_invalid_attribute_self__par_mode, __pyx_k_invalid_attribute_self__par_mode, 
sizeof(__pyx_k_invalid_attribute_self__par_mode), 0, 1, 0, 0},
 
 4995   {&__pyx_n_s_io, __pyx_k_io, 
sizeof(__pyx_k_io), 0, 0, 1, 1},
 
 4996   {&__pyx_n_s_key, __pyx_k_key, 
sizeof(__pyx_k_key), 0, 0, 1, 1},
 
 4997   {&__pyx_n_s_main, __pyx_k_main, 
sizeof(__pyx_k_main), 0, 0, 1, 1},
 
 4998   {&__pyx_n_s_metaclass, __pyx_k_metaclass, 
sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
 
 4999   {&__pyx_n_s_module, __pyx_k_module, 
sizeof(__pyx_k_module), 0, 0, 1, 1},
 
 5000   {&__pyx_n_u_mpi, __pyx_k_mpi, 
sizeof(__pyx_k_mpi), 0, 1, 0, 1},
 
 5001   {&__pyx_n_s_mpi4py, __pyx_k_mpi4py, 
sizeof(__pyx_k_mpi4py), 0, 0, 1, 1},
 
 5002   {&__pyx_n_s_nitems, __pyx_k_nitems, 
sizeof(__pyx_k_nitems), 0, 0, 1, 1},
 
 5003   {&__pyx_n_s_open, __pyx_k_open, 
sizeof(__pyx_k_open), 0, 0, 1, 1},
 
 5004   {&__pyx_n_s_par_mode, __pyx_k_par_mode, 
sizeof(__pyx_k_par_mode), 0, 0, 1, 1},
 
 5005   {&__pyx_n_s_par_mode_2, __pyx_k_par_mode_2, 
sizeof(__pyx_k_par_mode_2), 0, 0, 1, 1},
 
 5006   {&__pyx_n_s_prepare, __pyx_k_prepare, 
sizeof(__pyx_k_prepare), 0, 0, 1, 1},
 
 5007   {&__pyx_n_s_property, __pyx_k_property, 
sizeof(__pyx_k_property), 0, 0, 1, 1},
 
 5008   {&__pyx_n_s_qualname, __pyx_k_qualname, 
sizeof(__pyx_k_qualname), 0, 0, 1, 1},
 
 5009   {&__pyx_n_s_range, __pyx_k_range, 
sizeof(__pyx_k_range), 0, 0, 1, 1},
 
 5010   {&__pyx_n_s_read, __pyx_k_read, 
sizeof(__pyx_k_read), 0, 0, 1, 1},
 
 5011   {&__pyx_n_s_read_key, __pyx_k_read_key, 
sizeof(__pyx_k_read_key), 0, 0, 1, 1},
 
 5012   {&__pyx_kp_u_read_not_successful, __pyx_k_read_not_successful, 
sizeof(__pyx_k_read_not_successful), 0, 1, 0, 0},
 
 5013   {&__pyx_kp_u_read_not_successful_2, __pyx_k_read_not_successful_2, 
sizeof(__pyx_k_read_not_successful_2), 0, 1, 0, 0},
 
 5014   {&__pyx_n_s_ret, __pyx_k_ret, 
sizeof(__pyx_k_ret), 0, 0, 1, 1},
 
 5015   {&__pyx_n_s_self, __pyx_k_self, 
sizeof(__pyx_k_self), 0, 0, 1, 1},
 
 5016   {&__pyx_n_u_serial, __pyx_k_serial, 
sizeof(__pyx_k_serial), 0, 1, 0, 1},
 
 5017   {&__pyx_n_s_sid, __pyx_k_sid, 
sizeof(__pyx_k_sid), 0, 0, 1, 1},
 
 5018   {&__pyx_n_s_sid_2, __pyx_k_sid_2, 
sizeof(__pyx_k_sid_2), 0, 0, 1, 1},
 
 5019   {&__pyx_n_s_sionfile, __pyx_k_sionfile, 
sizeof(__pyx_k_sionfile), 0, 0, 1, 1},
 
 5020   {&__pyx_n_s_sioninter, __pyx_k_sioninter, 
sizeof(__pyx_k_sioninter), 0, 0, 1, 1},
 
 5021   {&__pyx_n_s_test, __pyx_k_test, 
sizeof(__pyx_k_test), 0, 0, 1, 1},
 
 5022   {&__pyx_n_s_valid_par_modes, __pyx_k_valid_par_modes, 
sizeof(__pyx_k_valid_par_modes), 0, 0, 1, 1},
 
 5023   {&__pyx_n_s_write, __pyx_k_write, 
sizeof(__pyx_k_write), 0, 0, 1, 1},
 
 5024   {&__pyx_n_s_write_key, __pyx_k_write_key, 
sizeof(__pyx_k_write_key), 0, 0, 1, 1},
 
 5025   {0, 0, 0, 0, 0, 0, 0}
 
 5027 static int __Pyx_InitCachedBuiltins(
void) {
 
 5028   __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); 
if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5029   __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); 
if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5030   __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); 
if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5031   __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); 
if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5032   __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); 
if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5038 static int __Pyx_InitCachedConstants(
void) {
 
 5039   __Pyx_RefNannyDeclarations
 
 5040   __Pyx_RefNannySetupContext(
"__Pyx_InitCachedConstants", 0);
 
 5049   __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_read_not_successful); 
if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5050   __Pyx_GOTREF(__pyx_tuple__11);
 
 5051   __Pyx_GIVEREF(__pyx_tuple__11);
 
 5060   __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_u_serial, __pyx_n_u_mpi); 
if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5061   __Pyx_GOTREF(__pyx_tuple__13);
 
 5062   __Pyx_GIVEREF(__pyx_tuple__13);
 
 5071   __pyx_tuple__14 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_par_mode); 
if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5072   __Pyx_GOTREF(__pyx_tuple__14);
 
 5073   __Pyx_GIVEREF(__pyx_tuple__14);
 
 5074   __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_thust_src_sionlib_pythonin, __pyx_n_s_init, 48, __pyx_empty_bytes); 
if (unlikely(!__pyx_codeobj__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5083   __pyx_tuple__16 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_fname_2, __pyx_n_s_file_mode_2); 
if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5084   __Pyx_GOTREF(__pyx_tuple__16);
 
 5085   __Pyx_GIVEREF(__pyx_tuple__16);
 
 5086   __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_thust_src_sionlib_pythonin, __pyx_n_s_open, 57, __pyx_empty_bytes); 
if (unlikely(!__pyx_codeobj__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5095   __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_s_self); 
if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5096   __Pyx_GOTREF(__pyx_tuple__18);
 
 5097   __Pyx_GIVEREF(__pyx_tuple__18);
 
 5098   __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_thust_src_sionlib_pythonin, __pyx_n_s_closed, 67, __pyx_empty_bytes); 
if (unlikely(!__pyx_codeobj__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5107   __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_self); 
if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5108   __Pyx_GOTREF(__pyx_tuple__20);
 
 5109   __Pyx_GIVEREF(__pyx_tuple__20);
 
 5110   __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_thust_src_sionlib_pythonin, __pyx_n_s_close, 71, __pyx_empty_bytes); 
if (unlikely(!__pyx_codeobj__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5119   __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); 
if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5120   __Pyx_GOTREF(__pyx_tuple__22);
 
 5121   __Pyx_GIVEREF(__pyx_tuple__22);
 
 5122   __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_thust_src_sionlib_pythonin, __pyx_n_s_write, 81, __pyx_empty_bytes); 
if (unlikely(!__pyx_codeobj__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5131   __pyx_tuple__24 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_nitems, __pyx_n_s_ret); 
if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5132   __Pyx_GOTREF(__pyx_tuple__24);
 
 5133   __Pyx_GIVEREF(__pyx_tuple__24);
 
 5134   __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_thust_src_sionlib_pythonin, __pyx_n_s_read, 85, __pyx_empty_bytes); 
if (unlikely(!__pyx_codeobj__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5143   __pyx_tuple__26 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_key); 
if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5144   __Pyx_GOTREF(__pyx_tuple__26);
 
 5145   __Pyx_GIVEREF(__pyx_tuple__26);
 
 5146   __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_thust_src_sionlib_pythonin, __pyx_n_s_write_key, 90, __pyx_empty_bytes); 
if (unlikely(!__pyx_codeobj__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5155   __pyx_tuple__28 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_nitems, __pyx_n_s_ret); 
if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5156   __Pyx_GOTREF(__pyx_tuple__28);
 
 5157   __Pyx_GIVEREF(__pyx_tuple__28);
 
 5158   __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_thust_src_sionlib_pythonin, __pyx_n_s_read_key, 94, __pyx_empty_bytes); 
if (unlikely(!__pyx_codeobj__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5167   __pyx_tuple__30 = PyTuple_Pack(4, __pyx_n_s_fname_2, __pyx_n_s_file_mode_2, __pyx_n_s_par_mode, __pyx_n_s_sionfile); 
if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5168   __Pyx_GOTREF(__pyx_tuple__30);
 
 5169   __Pyx_GIVEREF(__pyx_tuple__30);
 
 5170   __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_thust_src_sionlib_pythonin, __pyx_n_s_open, 100, __pyx_empty_bytes); 
if (unlikely(!__pyx_codeobj__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5171   __Pyx_RefNannyFinishContext();
 
 5174   __Pyx_RefNannyFinishContext();
 
 5178 static int __Pyx_InitGlobals(
void) {
 
 5179   if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;};
 
 5180   __pyx_int_0 = PyInt_FromLong(0); 
if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5181   __pyx_int_1 = PyInt_FromLong(1); 
if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5182   __pyx_int_32 = PyInt_FromLong(32); 
if (unlikely(!__pyx_int_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5183   __pyx_int_neg_1 = PyInt_FromLong(-1); 
if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5189 #if PY_MAJOR_VERSION < 3 
 5190 PyMODINIT_FUNC initsioninter(
void); 
 
 5191 PyMODINIT_FUNC initsioninter(
void)
 
 5193 PyMODINIT_FUNC PyInit_sioninter(
void); 
 
 5194 PyMODINIT_FUNC PyInit_sioninter(
void)
 
 5197   PyObject *__pyx_t_1 = NULL;
 
 5198   PyObject *__pyx_t_2 = NULL;
 
 5199   PyObject *__pyx_t_3 = NULL;
 
 5200   PyObject *__pyx_t_4 = NULL;
 
 5201   PyObject *__pyx_t_5 = NULL;
 
 5202   int __pyx_lineno = 0;
 
 5203   const char *__pyx_filename = NULL;
 
 5204   int __pyx_clineno = 0;
 
 5205   __Pyx_RefNannyDeclarations
 
 5207   __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"refnanny");
 
 5208   if (!__Pyx_RefNanny) {
 
 5210       __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"Cython.Runtime.refnanny");
 
 5211       if (!__Pyx_RefNanny)
 
 5212           Py_FatalError(
"failed to import 'refnanny' module");
 
 5215   __Pyx_RefNannySetupContext(
"PyMODINIT_FUNC PyInit_sioninter(void)", 0);
 
 5216   if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5217   __pyx_empty_tuple = PyTuple_New(0); 
if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5218   __pyx_empty_bytes = PyBytes_FromStringAndSize(
"", 0); 
if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5219   #ifdef __Pyx_CyFunction_USED 
 5220   if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5222   #ifdef __Pyx_FusedFunction_USED 
 5223   if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5225   #ifdef __Pyx_Generator_USED 
 5226   if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5230   #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS 
 5232   PyEval_InitThreads();
 
 5236   #if PY_MAJOR_VERSION < 3 
 5237   __pyx_m = Py_InitModule4(__Pyx_NAMESTR(
"sioninter"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_Interface_for_SIONlib_This_inter), 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
 
 5239   __pyx_m = PyModule_Create(&__pyx_moduledef);
 
 5241   if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5242   __pyx_d = PyModule_GetDict(__pyx_m); 
if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5244   __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); 
if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5245   #if CYTHON_COMPILING_IN_PYPY 
 5248   if (__Pyx_SetAttrString(__pyx_m, 
"__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;};
 
 5250   if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5251   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) 
 5252   if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5254   if (__pyx_module_is_main_sioninter) {
 
 5255     if (__Pyx_SetAttrString(__pyx_m, 
"__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;};
 
 5257   #if PY_MAJOR_VERSION >= 3 
 5259     PyObject *modules = PyImport_GetModuleDict(); 
if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5260     if (!PyDict_GetItemString(modules, 
"sioninter")) {
 
 5261       if (unlikely(PyDict_SetItemString(modules, 
"sioninter", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5266   if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5268   if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5274   __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, 
"type", 
 
 5275   #
if CYTHON_COMPILING_IN_PYPY
 
 5276   sizeof(PyTypeObject),
 
 5278   sizeof(PyHeapTypeObject),
 
 5280   0); 
if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5281   __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, 
"bool", 
sizeof(PyBoolObject), 0); 
if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 8; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5282   __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, 
"complex", 
sizeof(PyComplexObject), 0); 
if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5283   __pyx_ptype_7cpython_5array_array = __Pyx_ImportType(
"array", 
"array", 
sizeof(arrayobject), 0); 
if (unlikely(!__pyx_ptype_7cpython_5array_array)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5295   __pyx_t_1 = PyList_New(1); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5296   __Pyx_GOTREF(__pyx_t_1);
 
 5297   __Pyx_INCREF(__pyx_n_s_array);
 
 5298   PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_array);
 
 5299   __Pyx_GIVEREF(__pyx_n_s_array);
 
 5300   __pyx_t_2 = __Pyx_Import(__pyx_n_s_array, __pyx_t_1, 0); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5301   __Pyx_GOTREF(__pyx_t_2);
 
 5302   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 5303   __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_array); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5304   __Pyx_GOTREF(__pyx_t_1);
 
 5305   if (PyDict_SetItem(__pyx_d, __pyx_n_s_array, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5306   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 5307   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
 5316   __pyx_t_2 = __Pyx_Import(__pyx_n_s_io, 0, 0); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5317   __Pyx_GOTREF(__pyx_t_2);
 
 5318   if (PyDict_SetItem(__pyx_d, __pyx_n_s_io, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5319   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
 5328   __pyx_t_2 = PyList_New(1); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5329   __Pyx_GOTREF(__pyx_t_2);
 
 5330   __Pyx_INCREF(__pyx_n_s_MPI);
 
 5331   PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_MPI);
 
 5332   __Pyx_GIVEREF(__pyx_n_s_MPI);
 
 5333   __pyx_t_1 = __Pyx_Import(__pyx_n_s_mpi4py, __pyx_t_2, 0); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5334   __Pyx_GOTREF(__pyx_t_1);
 
 5335   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
 5336   __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_MPI); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5337   __Pyx_GOTREF(__pyx_t_2);
 
 5338   if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPI, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5339   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
 5340   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 5349   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_PAR_MODE, __pyx_n_u_serial) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5358   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_NTASKS, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5367   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_NFILES, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5376   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_GCOMM, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5385   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_LCOMM, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5394   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_CHUNKSIZE, __pyx_int_32) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5403   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_CHUNKSIZES, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5412   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_FSBLKSIZE, __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5421   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_GLOBALRANK, __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5430   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_GLOBALRANKS, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5439   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_FILEPTR, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5448   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_NITEMS, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5457   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_SIZE, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5466   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_io); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5467   __Pyx_GOTREF(__pyx_t_1);
 
 5468   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BufferedIOBase); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5469   __Pyx_GOTREF(__pyx_t_2);
 
 5470   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 5471   __pyx_t_1 = PyTuple_New(1); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5472   __Pyx_GOTREF(__pyx_t_1);
 
 5473   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
 
 5474   __Pyx_GIVEREF(__pyx_t_2);
 
 5476   __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); 
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5477   __Pyx_GOTREF(__pyx_t_2);
 
 5478   __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SIONFile, __pyx_n_s_SIONFile, (PyObject *) NULL, __pyx_n_s_sioninter, __pyx_kp_s_File_like_object_for_handling_SI); 
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5479   __Pyx_GOTREF(__pyx_t_3);
 
 5488   if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_valid_par_modes, __pyx_tuple__13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5497   __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9sioninter_8SIONFile_1__init__, 0, __pyx_n_s_SIONFile___init, NULL, __pyx_n_s_sioninter, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__15)); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5498   __Pyx_GOTREF(__pyx_t_4);
 
 5499   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, 
sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5500   __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_PAR_MODE); 
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5501   __Pyx_GOTREF(__pyx_t_5);
 
 5502   __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_4)->__pyx_arg_par_mode = __pyx_t_5;
 
 5503   __Pyx_GIVEREF(__pyx_t_5);
 
 5505   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_9sioninter_8SIONFile_16__defaults__);
 
 5506   if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5507   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 5516   __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9sioninter_8SIONFile_3open, 0, __pyx_n_s_SIONFile_open, NULL, __pyx_n_s_sioninter, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__17)); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5517   __Pyx_GOTREF(__pyx_t_4);
 
 5518   if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_open, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5519   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 5528   __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9sioninter_8SIONFile_5closed, 0, __pyx_n_s_SIONFile_closed, NULL, __pyx_n_s_sioninter, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__19)); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5529   __Pyx_GOTREF(__pyx_t_4);
 
 5538   __pyx_t_5 = PyTuple_New(1); 
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5539   __Pyx_GOTREF(__pyx_t_5);
 
 5540   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
 
 5541   __Pyx_GIVEREF(__pyx_t_4);
 
 5543   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5544   __Pyx_GOTREF(__pyx_t_4);
 
 5545   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
 5546   if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_closed, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5547   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 5556   __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9sioninter_8SIONFile_7close, 0, __pyx_n_s_SIONFile_close, NULL, __pyx_n_s_sioninter, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__21)); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5557   __Pyx_GOTREF(__pyx_t_4);
 
 5558   if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_close, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5559   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 5568   __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9sioninter_8SIONFile_9write, 0, __pyx_n_s_SIONFile_write, NULL, __pyx_n_s_sioninter, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__23)); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5569   __Pyx_GOTREF(__pyx_t_4);
 
 5570   if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_write, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5571   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 5580   __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9sioninter_8SIONFile_11read, 0, __pyx_n_s_SIONFile_read, NULL, __pyx_n_s_sioninter, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__25)); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5581   __Pyx_GOTREF(__pyx_t_4);
 
 5582   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, 
sizeof(__pyx_defaults1), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5583   __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_NITEMS); 
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5584   __Pyx_GOTREF(__pyx_t_5);
 
 5585   __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_4)->__pyx_arg_nitems = __pyx_t_5;
 
 5586   __Pyx_GIVEREF(__pyx_t_5);
 
 5588   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_9sioninter_8SIONFile_18__defaults__);
 
 5589   if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5590   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 5599   __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9sioninter_8SIONFile_13write_key, 0, __pyx_n_s_SIONFile_write_key, NULL, __pyx_n_s_sioninter, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__27)); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5600   __Pyx_GOTREF(__pyx_t_4);
 
 5601   if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_write_key, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5602   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 5611   __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9sioninter_8SIONFile_15read_key, 0, __pyx_n_s_SIONFile_read_key, NULL, __pyx_n_s_sioninter, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__29)); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5612   __Pyx_GOTREF(__pyx_t_4);
 
 5613   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, 
sizeof(__pyx_defaults2), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5614   __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_NITEMS); 
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5615   __Pyx_GOTREF(__pyx_t_5);
 
 5616   __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_4)->__pyx_arg_nitems = __pyx_t_5;
 
 5617   __Pyx_GIVEREF(__pyx_t_5);
 
 5619   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_9sioninter_8SIONFile_20__defaults__);
 
 5620   if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read_key, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5621   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 5630   __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SIONFile, __pyx_t_1, __pyx_t_3, NULL, 0, 0); 
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5631   __Pyx_GOTREF(__pyx_t_4);
 
 5632   if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIONFile, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5633   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
 5634   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
 5635   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
 5636   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 5645   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_PAR_MODE); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5646   __Pyx_GOTREF(__pyx_t_1);
 
 5647   __pyx_k__2 = __pyx_t_1;
 
 5648   __Pyx_GIVEREF(__pyx_t_1);
 
 5650   __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9sioninter_1open, NULL, __pyx_n_s_sioninter); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5651   __Pyx_GOTREF(__pyx_t_1);
 
 5652   if (PyDict_SetItem(__pyx_d, __pyx_n_s_open, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5653   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 5662   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_NTASKS); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5663   __Pyx_GOTREF(__pyx_t_1);
 
 5664   __pyx_k__3 = __pyx_t_1;
 
 5665   __Pyx_GIVEREF(__pyx_t_1);
 
 5667   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_NFILES); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5668   __Pyx_GOTREF(__pyx_t_1);
 
 5669   __pyx_k__4 = __pyx_t_1;
 
 5670   __Pyx_GIVEREF(__pyx_t_1);
 
 5680   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_CHUNKSIZES); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5681   __Pyx_GOTREF(__pyx_t_1);
 
 5682   __pyx_k__32 = __pyx_t_1;
 
 5683   __Pyx_GIVEREF(__pyx_t_1);
 
 5685   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_FSBLKSIZE); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5686   __Pyx_GOTREF(__pyx_t_1);
 
 5687   __pyx_k__5 = __pyx_t_1;
 
 5688   __Pyx_GIVEREF(__pyx_t_1);
 
 5698   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_GLOBALRANKS); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5699   __Pyx_GOTREF(__pyx_t_1);
 
 5700   __pyx_k__33 = __pyx_t_1;
 
 5701   __Pyx_GIVEREF(__pyx_t_1);
 
 5703   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_FILEPTR); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5704   __Pyx_GOTREF(__pyx_t_1);
 
 5705   __pyx_k__34 = __pyx_t_1;
 
 5706   __Pyx_GIVEREF(__pyx_t_1);
 
 5716   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_NFILES); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5717   __Pyx_GOTREF(__pyx_t_1);
 
 5718   __pyx_k__6 = __pyx_t_1;
 
 5719   __Pyx_GIVEREF(__pyx_t_1);
 
 5729   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_GCOMM); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5730   __Pyx_GOTREF(__pyx_t_1);
 
 5731   __pyx_k__35 = __pyx_t_1;
 
 5732   __Pyx_GIVEREF(__pyx_t_1);
 
 5734   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_LCOMM); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5735   __Pyx_GOTREF(__pyx_t_1);
 
 5736   __pyx_k__36 = __pyx_t_1;
 
 5737   __Pyx_GIVEREF(__pyx_t_1);
 
 5747   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_CHUNKSIZE); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5748   __Pyx_GOTREF(__pyx_t_1);
 
 5749   __pyx_k__7 = __pyx_t_1;
 
 5750   __Pyx_GIVEREF(__pyx_t_1);
 
 5752   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_FSBLKSIZE); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5753   __Pyx_GOTREF(__pyx_t_1);
 
 5754   __pyx_k__8 = __pyx_t_1;
 
 5755   __Pyx_GIVEREF(__pyx_t_1);
 
 5765   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_GLOBALRANK); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5766   __Pyx_GOTREF(__pyx_t_1);
 
 5767   __pyx_k__9 = __pyx_t_1;
 
 5768   __Pyx_GIVEREF(__pyx_t_1);
 
 5770   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_FILEPTR); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5771   __Pyx_GOTREF(__pyx_t_1);
 
 5772   __pyx_k__37 = __pyx_t_1;
 
 5773   __Pyx_GIVEREF(__pyx_t_1);
 
 5783   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_NITEMS); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5784   __Pyx_GOTREF(__pyx_t_1);
 
 5785   __pyx_k__10 = __pyx_t_1;
 
 5786   __Pyx_GIVEREF(__pyx_t_1);
 
 5796   __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_NITEMS); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5797   __Pyx_GOTREF(__pyx_t_1);
 
 5798   __pyx_k__12 = __pyx_t_1;
 
 5799   __Pyx_GIVEREF(__pyx_t_1);
 
 5807   __pyx_t_1 = PyDict_New(); 
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5808   __Pyx_GOTREF(__pyx_t_1);
 
 5809   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; 
goto __pyx_L1_error;}
 
 5810   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
 5821   __Pyx_XDECREF(__pyx_t_1);
 
 5822   __Pyx_XDECREF(__pyx_t_2);
 
 5823   __Pyx_XDECREF(__pyx_t_3);
 
 5824   __Pyx_XDECREF(__pyx_t_4);
 
 5825   __Pyx_XDECREF(__pyx_t_5);
 
 5827     __Pyx_AddTraceback(
"init sioninter", __pyx_clineno, __pyx_lineno, __pyx_filename);
 
 5828     Py_DECREF(__pyx_m); __pyx_m = 0;
 
 5829   } 
else if (!PyErr_Occurred()) {
 
 5830     PyErr_SetString(PyExc_ImportError, 
"init sioninter");
 
 5833   __Pyx_RefNannyFinishContext();
 
 5834   #if PY_MAJOR_VERSION < 3 
 5843 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname) {
 
 5844     PyObject *m = NULL, *p = NULL;
 
 5846     m = PyImport_ImportModule((
char *)modname);
 
 5848     p = PyObject_GetAttrString(m, (
char *)
"RefNannyAPI");
 
 5850     r = PyLong_AsVoidPtr(p);
 
 5854     return (__Pyx_RefNannyAPIStruct *)r;
 
 5858 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
 
 5859     PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
 
 5860     if (unlikely(!result)) {
 
 5861         PyErr_Format(PyExc_NameError,
 
 5862 #
if PY_MAJOR_VERSION >= 3
 
 5863             "name '%U' is not defined", name);
 
 5865             "name '%.200s' is not defined", PyString_AS_STRING(name));
 
 5871 static void __Pyx_RaiseDoubleKeywordsError(
 
 5872     const char* func_name,
 
 5875     PyErr_Format(PyExc_TypeError,
 
 5876         #
if PY_MAJOR_VERSION >= 3
 
 5877         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
 
 5879         "%s() got multiple values for keyword argument '%s'", func_name,
 
 5880         PyString_AsString(kw_name));
 
 5884 static int __Pyx_ParseOptionalKeywords(
 
 5886     PyObject **argnames[],
 
 5889     Py_ssize_t num_pos_args,
 
 5890     const char* function_name)
 
 5892     PyObject *key = 0, *value = 0;
 
 5895     PyObject*** first_kw_arg = argnames + num_pos_args;
 
 5896     while (PyDict_Next(kwds, &pos, &key, &value)) {
 
 5897         name = first_kw_arg;
 
 5898         while (*name && (**name != key)) name++;
 
 5900             values[name-argnames] = value;
 
 5903         name = first_kw_arg;
 
 5904         #if PY_MAJOR_VERSION < 3 
 5905         if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
 
 5907                 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
 
 5908                         && _PyString_Eq(**name, key)) {
 
 5909                     values[name-argnames] = value;
 
 5914             if (*name) 
continue;
 
 5916                 PyObject*** argname = argnames;
 
 5917                 while (argname != first_kw_arg) {
 
 5918                     if ((**argname == key) || (
 
 5919                             (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
 
 5920                              && _PyString_Eq(**argname, key))) {
 
 5921                         goto arg_passed_twice;
 
 5928         if (likely(PyUnicode_Check(key))) {
 
 5930                 int cmp = (**name == key) ? 0 :
 
 5931                 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
 
 5932                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
 
 5934                     PyUnicode_Compare(**name, key);
 
 5935                 if (cmp < 0 && unlikely(PyErr_Occurred())) 
goto bad;
 
 5937                     values[name-argnames] = value;
 
 5942             if (*name) 
continue;
 
 5944                 PyObject*** argname = argnames;
 
 5945                 while (argname != first_kw_arg) {
 
 5946                     int cmp = (**argname == key) ? 0 :
 
 5947                     #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
 
 5948                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
 
 5950                         PyUnicode_Compare(**argname, key);
 
 5951                     if (cmp < 0 && unlikely(PyErr_Occurred())) 
goto bad;
 
 5952                     if (cmp == 0) 
goto arg_passed_twice;
 
 5957             goto invalid_keyword_type;
 
 5959             if (unlikely(PyDict_SetItem(kwds2, key, value))) 
goto bad;
 
 5961             goto invalid_keyword;
 
 5966     __Pyx_RaiseDoubleKeywordsError(function_name, key);
 
 5968 invalid_keyword_type:
 
 5969     PyErr_Format(PyExc_TypeError,
 
 5970         "%.200s() keywords must be strings", function_name);
 
 5973     PyErr_Format(PyExc_TypeError,
 
 5974     #
if PY_MAJOR_VERSION < 3
 
 5975         "%.200s() got an unexpected keyword argument '%.200s'",
 
 5976         function_name, PyString_AsString(key));
 
 5978         "%s() got an unexpected keyword argument '%U'",
 
 5979         function_name, key);
 
 5985 static void __Pyx_RaiseArgtupleInvalid(
 
 5986     const char* func_name,
 
 5990     Py_ssize_t num_found)
 
 5992     Py_ssize_t num_expected;
 
 5993     const char *more_or_less;
 
 5994     if (num_found < num_min) {
 
 5995         num_expected = num_min;
 
 5996         more_or_less = 
"at least";
 
 5998         num_expected = num_max;
 
 5999         more_or_less = 
"at most";
 
 6002         more_or_less = 
"exactly";
 
 6004     PyErr_Format(PyExc_TypeError,
 
 6005                  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T 
"d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T 
"d given)",
 
 6006                  func_name, more_or_less, num_expected,
 
 6007                  (num_expected == 1) ? 
"" : 
"s", num_found);
 
 6010 #if CYTHON_COMPILING_IN_CPYTHON 
 6011 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
 
 6013     ternaryfunc call = func->ob_type->tp_call;
 
 6014     if (unlikely(!call))
 
 6015         return PyObject_Call(func, arg, kw);
 
 6016 #if PY_VERSION_HEX >= 0x02060000 
 6017     if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object")))
 
 6020     result = (*call)(func, arg, kw);
 
 6021 #if PY_VERSION_HEX >= 0x02060000 
 6022     Py_LeaveRecursiveCall();
 
 6024     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
 
 6027             "NULL result without error in PyObject_Call");
 
 6033 static CYTHON_INLINE 
void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
 
 6034 #if CYTHON_COMPILING_IN_CPYTHON 
 6035     PyObject *tmp_type, *tmp_value, *tmp_tb;
 
 6036     PyThreadState *tstate = PyThreadState_GET();
 
 6037     tmp_type = tstate->curexc_type;
 
 6038     tmp_value = tstate->curexc_value;
 
 6039     tmp_tb = tstate->curexc_traceback;
 
 6040     tstate->curexc_type = type;
 
 6041     tstate->curexc_value = value;
 
 6042     tstate->curexc_traceback = tb;
 
 6043     Py_XDECREF(tmp_type);
 
 6044     Py_XDECREF(tmp_value);
 
 6047     PyErr_Restore(type, value, tb);
 
 6050 static CYTHON_INLINE 
void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
 
 6051 #if CYTHON_COMPILING_IN_CPYTHON 
 6052     PyThreadState *tstate = PyThreadState_GET();
 
 6053     *type = tstate->curexc_type;
 
 6054     *value = tstate->curexc_value;
 
 6055     *tb = tstate->curexc_traceback;
 
 6056     tstate->curexc_type = 0;
 
 6057     tstate->curexc_value = 0;
 
 6058     tstate->curexc_traceback = 0;
 
 6060     PyErr_Fetch(type, value, tb);
 
 6064 #if PY_MAJOR_VERSION < 3 
 6065 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
 
 6066                         CYTHON_UNUSED PyObject *cause) {
 
 6068     if (!value || value == Py_None)
 
 6072     if (!tb || tb == Py_None)
 
 6076         if (!PyTraceBack_Check(tb)) {
 
 6077             PyErr_SetString(PyExc_TypeError,
 
 6078                 "raise: arg 3 must be a traceback or None");
 
 6082     #if PY_VERSION_HEX < 0x02050000 
 6083     if (PyClass_Check(type)) {
 
 6085     if (PyType_Check(type)) {
 
 6087 #if CYTHON_COMPILING_IN_PYPY 
 6093         PyErr_NormalizeException(&type, &value, &tb);
 
 6096             PyErr_SetString(PyExc_TypeError,
 
 6097                 "instance exception may not have a separate value");
 
 6101         #if PY_VERSION_HEX < 0x02050000 
 6102         if (PyInstance_Check(type)) {
 
 6103             type = (PyObject*) ((PyInstanceObject*)type)->in_class;
 
 6107             PyErr_SetString(PyExc_TypeError,
 
 6108                 "raise: exception must be an old-style class or instance");
 
 6112         type = (PyObject*) Py_TYPE(type);
 
 6114         if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
 
 6115             PyErr_SetString(PyExc_TypeError,
 
 6116                 "raise: exception class must be a subclass of BaseException");
 
 6121     __Pyx_ErrRestore(type, value, tb);
 
 6130 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
 
 6131     PyObject* owned_instance = NULL;
 
 6132     if (tb == Py_None) {
 
 6134     } 
else if (tb && !PyTraceBack_Check(tb)) {
 
 6135         PyErr_SetString(PyExc_TypeError,
 
 6136             "raise: arg 3 must be a traceback or None");
 
 6139     if (value == Py_None)
 
 6141     if (PyExceptionInstance_Check(type)) {
 
 6143             PyErr_SetString(PyExc_TypeError,
 
 6144                 "instance exception may not have a separate value");
 
 6148         type = (PyObject*) Py_TYPE(value);
 
 6149     } 
else if (PyExceptionClass_Check(type)) {
 
 6150         PyObject *instance_class = NULL;
 
 6151         if (value && PyExceptionInstance_Check(value)) {
 
 6152             instance_class = (PyObject*) Py_TYPE(value);
 
 6153             if (instance_class != type) {
 
 6154                 if (PyObject_IsSubclass(instance_class, type)) {
 
 6155                     type = instance_class;
 
 6157                     instance_class = NULL;
 
 6161         if (!instance_class) {
 
 6164                 args = PyTuple_New(0);
 
 6165             else if (PyTuple_Check(value)) {
 
 6169                 args = PyTuple_Pack(1, value);
 
 6172             owned_instance = PyObject_Call(type, args, NULL);
 
 6174             if (!owned_instance)
 
 6176             value = owned_instance;
 
 6177             if (!PyExceptionInstance_Check(value)) {
 
 6178                 PyErr_Format(PyExc_TypeError,
 
 6179                              "calling %R should have returned an instance of " 
 6180                              "BaseException, not %R",
 
 6181                              type, Py_TYPE(value));
 
 6186         PyErr_SetString(PyExc_TypeError,
 
 6187             "raise: exception class must be a subclass of BaseException");
 
 6190 #if PY_VERSION_HEX >= 0x03030000 
 6193     if (cause && cause != Py_None) {
 
 6195         PyObject *fixed_cause;
 
 6196         if (cause == Py_None) {
 
 6198         } 
else if (PyExceptionClass_Check(cause)) {
 
 6199             fixed_cause = PyObject_CallObject(cause, NULL);
 
 6200             if (fixed_cause == NULL)
 
 6202         } 
else if (PyExceptionInstance_Check(cause)) {
 
 6203             fixed_cause = cause;
 
 6204             Py_INCREF(fixed_cause);
 
 6206             PyErr_SetString(PyExc_TypeError,
 
 6207                             "exception causes must derive from " 
 6211         PyException_SetCause(value, fixed_cause);
 
 6213     PyErr_SetObject(type, value);
 
 6215         PyThreadState *tstate = PyThreadState_GET();
 
 6216         PyObject* tmp_tb = tstate->curexc_traceback;
 
 6219             tstate->curexc_traceback = tb;
 
 6224     Py_XDECREF(owned_instance);
 
 6229 static CYTHON_INLINE 
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, 
int equals) {
 
 6230 #if CYTHON_COMPILING_IN_PYPY 
 6231     return PyObject_RichCompareBool(s1, s2, equals);
 
 6234         return (equals == Py_EQ);
 
 6235     } 
else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
 
 6236         const char *ps1, *ps2;
 
 6237         Py_ssize_t length = PyBytes_GET_SIZE(s1);
 
 6238         if (length != PyBytes_GET_SIZE(s2))
 
 6239             return (equals == Py_NE);
 
 6240         ps1 = PyBytes_AS_STRING(s1);
 
 6241         ps2 = PyBytes_AS_STRING(s2);
 
 6242         if (ps1[0] != ps2[0]) {
 
 6243             return (equals == Py_NE);
 
 6244         } 
else if (length == 1) {
 
 6245             return (equals == Py_EQ);
 
 6247             int result = memcmp(ps1, ps2, (
size_t)length);
 
 6248             return (equals == Py_EQ) ? (result == 0) : (result != 0);
 
 6250     } 
else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
 
 6251         return (equals == Py_NE);
 
 6252     } 
else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
 
 6253         return (equals == Py_NE);
 
 6256         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
 
 6259         result = __Pyx_PyObject_IsTrue(py_result);
 
 6260         Py_DECREF(py_result);
 
 6266 static CYTHON_INLINE 
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, 
int equals) {
 
 6267 #if CYTHON_COMPILING_IN_PYPY 
 6268     return PyObject_RichCompareBool(s1, s2, equals);
 
 6270 #if PY_MAJOR_VERSION < 3 
 6271     PyObject* owned_ref = NULL;
 
 6273     int s1_is_unicode, s2_is_unicode;
 
 6277     s1_is_unicode = PyUnicode_CheckExact(s1);
 
 6278     s2_is_unicode = PyUnicode_CheckExact(s2);
 
 6279 #if PY_MAJOR_VERSION < 3 
 6280     if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
 
 6281         owned_ref = PyUnicode_FromObject(s2);
 
 6282         if (unlikely(!owned_ref))
 
 6286     } 
else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
 
 6287         owned_ref = PyUnicode_FromObject(s1);
 
 6288         if (unlikely(!owned_ref))
 
 6292     } 
else if (((!s2_is_unicode) & (!s1_is_unicode))) {
 
 6293         return __Pyx_PyBytes_Equals(s1, s2, equals);
 
 6296     if (s1_is_unicode & s2_is_unicode) {
 
 6299         void *data1, *data2;
 
 6300         #if CYTHON_PEP393_ENABLED 
 6301         if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0))
 
 6304         length = __Pyx_PyUnicode_GET_LENGTH(s1);
 
 6305         if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
 
 6308         kind = __Pyx_PyUnicode_KIND(s1);
 
 6309         if (kind != __Pyx_PyUnicode_KIND(s2)) {
 
 6312         data1 = __Pyx_PyUnicode_DATA(s1);
 
 6313         data2 = __Pyx_PyUnicode_DATA(s2);
 
 6314         if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
 
 6316         } 
else if (length == 1) {
 
 6319             int result = memcmp(data1, data2, (
size_t)(length * kind));
 
 6320             #if PY_MAJOR_VERSION < 3 
 6321             Py_XDECREF(owned_ref);
 
 6323             return (equals == Py_EQ) ? (result == 0) : (result != 0);
 
 6325     } 
else if ((s1 == Py_None) & s2_is_unicode) {
 
 6327     } 
else if ((s2 == Py_None) & s1_is_unicode) {
 
 6331         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
 
 6334         result = __Pyx_PyObject_IsTrue(py_result);
 
 6335         Py_DECREF(py_result);
 
 6339     #if PY_MAJOR_VERSION < 3 
 6340     Py_XDECREF(owned_ref);
 
 6342     return (equals == Py_EQ);
 
 6344     #if PY_MAJOR_VERSION < 3 
 6345     Py_XDECREF(owned_ref);
 
 6347     return (equals == Py_NE);
 
 6351 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
 
 6353 #if CYTHON_COMPILING_IN_CPYTHON 
 6354     result = PyDict_GetItem(__pyx_d, name);
 
 6359     result = PyObject_GetItem(__pyx_d, name);
 
 6363         result = __Pyx_GetBuiltinName(name);
 
 6368 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
 
 6369     PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
 
 6370     if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
 
 6371         PyErr_Format(PyExc_ImportError,
 
 6372         #
if PY_MAJOR_VERSION < 3
 
 6373             "cannot import name %.230s", PyString_AS_STRING(name));
 
 6375             "cannot import name %S", name);
 
 6381 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
 
 6382     Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
 
 6383     for (i=0; i < nbases; i++) {
 
 6384         PyTypeObject *tmptype;
 
 6385         PyObject *tmp = PyTuple_GET_ITEM(bases, i);
 
 6386         tmptype = Py_TYPE(tmp);
 
 6387 #if PY_MAJOR_VERSION < 3 
 6388         if (tmptype == &PyClass_Type)
 
 6392             metaclass = tmptype;
 
 6395         if (PyType_IsSubtype(metaclass, tmptype))
 
 6397         if (PyType_IsSubtype(tmptype, metaclass)) {
 
 6398             metaclass = tmptype;
 
 6401         PyErr_SetString(PyExc_TypeError,
 
 6402                         "metaclass conflict: " 
 6403                         "the metaclass of a derived class " 
 6404                         "must be a (non-strict) subclass " 
 6405                         "of the metaclasses of all its bases");
 
 6409 #if PY_MAJOR_VERSION < 3 
 6410         metaclass = &PyClass_Type;
 
 6412         metaclass = &PyType_Type;
 
 6415     Py_INCREF((PyObject*) metaclass);
 
 6416     return (PyObject*) metaclass;
 
 6419 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
 
 6420     PyObject* fake_module;
 
 6421     PyTypeObject* cached_type = NULL;
 
 6422     fake_module = PyImport_AddModule((
char*) 
"_cython_" CYTHON_ABI);
 
 6423     if (!fake_module) 
return NULL;
 
 6424     Py_INCREF(fake_module);
 
 6425     cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
 
 6427         if (!PyType_Check((PyObject*)cached_type)) {
 
 6428             PyErr_Format(PyExc_TypeError,
 
 6429                 "Shared Cython type %.200s is not a type object",
 
 6433         if (cached_type->tp_basicsize != type->tp_basicsize) {
 
 6434             PyErr_Format(PyExc_TypeError,
 
 6435                 "Shared Cython type %.200s has the wrong size, try recompiling",
 
 6440         if (!PyErr_ExceptionMatches(PyExc_AttributeError)) 
goto bad;
 
 6442         if (PyType_Ready(type) < 0) 
goto bad;
 
 6443         if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
 
 6449     Py_DECREF(fake_module);
 
 6452     Py_XDECREF(cached_type);
 
 6458 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED 
void *closure)
 
 6460     if (unlikely(op->func_doc == NULL)) {
 
 6461         if (op->func.m_ml->ml_doc) {
 
 6462 #if PY_MAJOR_VERSION >= 3 
 6463             op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
 
 6465             op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
 
 6467             if (unlikely(op->func_doc == NULL))
 
 6474     Py_INCREF(op->func_doc);
 
 6475     return op->func_doc;
 
 6478 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
 
 6480     PyObject *tmp = op->func_doc;
 
 6484     op->func_doc = value;
 
 6489 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
 
 6491     if (unlikely(op->func_name == NULL)) {
 
 6492 #if PY_MAJOR_VERSION >= 3 
 6493         op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
 
 6495         op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
 
 6497         if (unlikely(op->func_name == NULL))
 
 6500     Py_INCREF(op->func_name);
 
 6501     return op->func_name;
 
 6504 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
 
 6507 #if PY_MAJOR_VERSION >= 3 
 6508     if (unlikely(value == NULL || !PyUnicode_Check(value))) {
 
 6510     if (unlikely(value == NULL || !PyString_Check(value))) {
 
 6512         PyErr_SetString(PyExc_TypeError,
 
 6513                         "__name__ must be set to a string object");
 
 6516     tmp = op->func_name;
 
 6518     op->func_name = value;
 
 6523 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
 
 6525     Py_INCREF(op->func_qualname);
 
 6526     return op->func_qualname;
 
 6529 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
 
 6532 #if PY_MAJOR_VERSION >= 3 
 6533     if (unlikely(value == NULL || !PyUnicode_Check(value))) {
 
 6535     if (unlikely(value == NULL || !PyString_Check(value))) {
 
 6537         PyErr_SetString(PyExc_TypeError,
 
 6538                         "__qualname__ must be set to a string object");
 
 6541     tmp = op->func_qualname;
 
 6543     op->func_qualname = value;
 
 6548 __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED 
void *closure)
 
 6551     self = m->func_closure;
 
 6558 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
 
 6560     if (unlikely(op->func_dict == NULL)) {
 
 6561         op->func_dict = PyDict_New();
 
 6562         if (unlikely(op->func_dict == NULL))
 
 6565     Py_INCREF(op->func_dict);
 
 6566     return op->func_dict;
 
 6569 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
 
 6572     if (unlikely(value == NULL)) {
 
 6573         PyErr_SetString(PyExc_TypeError,
 
 6574                "function's dictionary may not be deleted");
 
 6577     if (unlikely(!PyDict_Check(value))) {
 
 6578         PyErr_SetString(PyExc_TypeError,
 
 6579                "setting function's dictionary to a non-dict");
 
 6582     tmp = op->func_dict;
 
 6584     op->func_dict = value;
 
 6589 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
 
 6591     Py_INCREF(op->func_globals);
 
 6592     return op->func_globals;
 
 6595 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
 
 6601 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
 
 6603     PyObject* result = (op->func_code) ? op->func_code : Py_None;
 
 6608 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
 
 6609     PyObject *res = op->defaults_getter((PyObject *) op);
 
 6612     op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
 
 6613     Py_INCREF(op->defaults_tuple);
 
 6614     op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
 
 6615     Py_INCREF(op->defaults_kwdict);
 
 6620 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
 
 6624     } 
else if (value != Py_None && !PyTuple_Check(value)) {
 
 6625         PyErr_SetString(PyExc_TypeError,
 
 6626                         "__defaults__ must be set to a tuple object");
 
 6630     tmp = op->defaults_tuple;
 
 6631     op->defaults_tuple = value;
 
 6636 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
 
 6637     PyObject* result = op->defaults_tuple;
 
 6638     if (unlikely(!result)) {
 
 6639         if (op->defaults_getter) {
 
 6640             if (__Pyx_CyFunction_init_defaults(op) < 0) 
return NULL;
 
 6641             result = op->defaults_tuple;
 
 6650 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
 
 6654     } 
else if (value != Py_None && !PyDict_Check(value)) {
 
 6655         PyErr_SetString(PyExc_TypeError,
 
 6656                         "__kwdefaults__ must be set to a dict object");
 
 6660     tmp = op->defaults_kwdict;
 
 6661     op->defaults_kwdict = value;
 
 6666 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
 
 6667     PyObject* result = op->defaults_kwdict;
 
 6668     if (unlikely(!result)) {
 
 6669         if (op->defaults_getter) {
 
 6670             if (__Pyx_CyFunction_init_defaults(op) < 0) 
return NULL;
 
 6671             result = op->defaults_kwdict;
 
 6680 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
 
 6682     if (!value || value == Py_None) {
 
 6684     } 
else if (!PyDict_Check(value)) {
 
 6685         PyErr_SetString(PyExc_TypeError,
 
 6686                         "__annotations__ must be set to a dict object");
 
 6690     tmp = op->func_annotations;
 
 6691     op->func_annotations = value;
 
 6696 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
 
 6697     PyObject* result = op->func_annotations;
 
 6698     if (unlikely(!result)) {
 
 6699         result = PyDict_New();
 
 6700         if (unlikely(!result)) 
return NULL;
 
 6701         op->func_annotations = result;
 
 6706 static PyGetSetDef __pyx_CyFunction_getsets[] = {
 
 6707     {(
char *) 
"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
 
 6708     {(
char *) 
"__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
 
 6709     {(
char *) 
"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
 
 6710     {(
char *) 
"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
 
 6711     {(
char *) 
"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
 
 6712     {(
char *) 
"__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
 
 6713     {(
char *) 
"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
 
 6714     {(
char *) 
"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
 
 6715     {(
char *) 
"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
 
 6716     {(
char *) 
"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
 
 6717     {(
char *) 
"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
 
 6718     {(
char *) 
"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
 
 6719     {(
char *) 
"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
 
 6720     {(
char *) 
"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
 
 6721     {(
char *) 
"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
 
 6722     {(
char *) 
"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
 
 6723     {(
char *) 
"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
 
 6724     {(
char *) 
"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
 
 6727 #ifndef PY_WRITE_RESTRICTED  
 6728 #define PY_WRITE_RESTRICTED WRITE_RESTRICTED 
 6730 static PyMemberDef __pyx_CyFunction_members[] = {
 
 6731     {(
char *) 
"__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
 
 6735 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
 
 6737 #if PY_MAJOR_VERSION >= 3 
 6738     return PyUnicode_FromString(m->func.m_ml->ml_name);
 
 6740     return PyString_FromString(m->func.m_ml->ml_name);
 
 6743 static PyMethodDef __pyx_CyFunction_methods[] = {
 
 6744     {__Pyx_NAMESTR(
"__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
 
 6747 static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, 
int flags, PyObject* qualname,
 
 6748                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
 
 6749     __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
 
 6753     op->func_weakreflist = NULL;
 
 6755     op->func.m_self = (PyObject *) op;
 
 6756     Py_XINCREF(closure);
 
 6757     op->func_closure = closure;
 
 6759     op->func.m_module = module;
 
 6760     op->func_dict = NULL;
 
 6761     op->func_name = NULL;
 
 6762     Py_INCREF(qualname);
 
 6763     op->func_qualname = qualname;
 
 6764     op->func_doc = NULL;
 
 6765     op->func_classobj = NULL;
 
 6766     op->func_globals = globals;
 
 6767     Py_INCREF(op->func_globals);
 
 6769     op->func_code = code;
 
 6770     op->defaults_pyobjects = 0;
 
 6771     op->defaults = NULL;
 
 6772     op->defaults_tuple = NULL;
 
 6773     op->defaults_kwdict = NULL;
 
 6774     op->defaults_getter = NULL;
 
 6775     op->func_annotations = NULL;
 
 6776     PyObject_GC_Track(op);
 
 6777     return (PyObject *) op;
 
 6780 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
 
 6782     Py_CLEAR(m->func_closure);
 
 6783     Py_CLEAR(m->func.m_module);
 
 6784     Py_CLEAR(m->func_dict);
 
 6785     Py_CLEAR(m->func_name);
 
 6786     Py_CLEAR(m->func_qualname);
 
 6787     Py_CLEAR(m->func_doc);
 
 6788     Py_CLEAR(m->func_globals);
 
 6789     Py_CLEAR(m->func_code);
 
 6790     Py_CLEAR(m->func_classobj);
 
 6791     Py_CLEAR(m->defaults_tuple);
 
 6792     Py_CLEAR(m->defaults_kwdict);
 
 6793     Py_CLEAR(m->func_annotations);
 
 6795         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
 
 6797         for (i = 0; i < m->defaults_pyobjects; i++)
 
 6798             Py_XDECREF(pydefaults[i]);
 
 6799         PyMem_Free(m->defaults);
 
 6804 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
 
 6806     PyObject_GC_UnTrack(m);
 
 6807     if (m->func_weakreflist != NULL)
 
 6808         PyObject_ClearWeakRefs((PyObject *) m);
 
 6809     __Pyx_CyFunction_clear(m);
 
 6812 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, 
void *arg)
 
 6814     Py_VISIT(m->func_closure);
 
 6815     Py_VISIT(m->func.m_module);
 
 6816     Py_VISIT(m->func_dict);
 
 6817     Py_VISIT(m->func_name);
 
 6818     Py_VISIT(m->func_qualname);
 
 6819     Py_VISIT(m->func_doc);
 
 6820     Py_VISIT(m->func_globals);
 
 6821     Py_VISIT(m->func_code);
 
 6822     Py_VISIT(m->func_classobj);
 
 6823     Py_VISIT(m->defaults_tuple);
 
 6824     Py_VISIT(m->defaults_kwdict);
 
 6826         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
 
 6828         for (i = 0; i < m->defaults_pyobjects; i++)
 
 6829             Py_VISIT(pydefaults[i]);
 
 6833 static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
 
 6835     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
 
 6836     if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
 
 6840     if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
 
 6842             type = (PyObject *)(Py_TYPE(obj));
 
 6843         return PyMethod_New(func,
 
 6844                             type, (PyObject *)(Py_TYPE(type)));
 
 6848     return PyMethod_New(func, obj, type);
 
 6851 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
 
 6853 #if PY_MAJOR_VERSION >= 3 
 6854     return PyUnicode_FromFormat(
"<cyfunction %U at %p>",
 
 6855                                 op->func_qualname, (
void *)op);
 
 6857     return PyString_FromFormat(
"<cyfunction %s at %p>",
 
 6858                                PyString_AsString(op->func_qualname), (
void *)op);
 
 6861 #if CYTHON_COMPILING_IN_PYPY 
 6862 static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
 
 6863     PyCFunctionObject* f = (PyCFunctionObject*)func;
 
 6864     PyCFunction meth = PyCFunction_GET_FUNCTION(func);
 
 6865     PyObject *
self = PyCFunction_GET_SELF(func);
 
 6867     switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
 
 6869         if (likely(kw == NULL) || PyDict_Size(kw) == 0)
 
 6870             return (*meth)(
self, arg);
 
 6872     case METH_VARARGS | METH_KEYWORDS:
 
 6873         return (*(PyCFunctionWithKeywords)meth)(
self, arg, kw);
 
 6875         if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
 
 6876             size = PyTuple_GET_SIZE(arg);
 
 6878                 return (*meth)(
self, NULL);
 
 6879             PyErr_Format(PyExc_TypeError,
 
 6880                 "%.200s() takes no arguments (%zd given)",
 
 6881                 f->m_ml->ml_name, size);
 
 6886         if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
 
 6887             size = PyTuple_GET_SIZE(arg);
 
 6889                 return (*meth)(
self, PyTuple_GET_ITEM(arg, 0));
 
 6890             PyErr_Format(PyExc_TypeError,
 
 6891                 "%.200s() takes exactly one argument (%zd given)",
 
 6892                 f->m_ml->ml_name, size);
 
 6897         PyErr_SetString(PyExc_SystemError, 
"Bad call flags in " 
 6898                         "__Pyx_CyFunction_Call. METH_OLDARGS is no " 
 6899                         "longer supported!");
 
 6902     PyErr_Format(PyExc_TypeError, 
"%.200s() takes no keyword arguments",
 
 6907 static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
 
 6908     return PyCFunction_Call(func, arg, kw);
 
 6911 static PyTypeObject __pyx_CyFunctionType_type = {
 
 6912     PyVarObject_HEAD_INIT(0, 0)
 
 6913     __Pyx_NAMESTR("cython_function_or_method"), 
 
 6914     sizeof(__pyx_CyFunctionObject),   
 
 6916     (destructor) __Pyx_CyFunction_dealloc, 
 
 6920 #if PY_MAJOR_VERSION < 3 
 6925     (reprfunc) __Pyx_CyFunction_repr,   
 
 6930     __Pyx_CyFunction_Call,              
 
 6935     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, 
 
 6937     (traverseproc) __Pyx_CyFunction_traverse,   
 
 6938     (inquiry) __Pyx_CyFunction_clear,   
 
 6940     offsetof(__pyx_CyFunctionObject, func_weakreflist), 
 
 6943     __pyx_CyFunction_methods,           
 
 6944     __pyx_CyFunction_members,           
 
 6945     __pyx_CyFunction_getsets,           
 
 6948     __Pyx_CyFunction_descr_get,         
 
 6950     offsetof(__pyx_CyFunctionObject, func_dict),
 
 6962 #if PY_VERSION_HEX >= 0x02060000 
 6965 #if PY_VERSION_HEX >= 0x030400a1 
 6969 static int __Pyx_CyFunction_init(
void) {
 
 6970 #if !CYTHON_COMPILING_IN_PYPY 
 6971     __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
 
 6973     __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
 
 6974     if (__pyx_CyFunctionType == NULL) {
 
 6979 static CYTHON_INLINE 
void *__Pyx_CyFunction_InitDefaults(PyObject *func, 
size_t size, 
int pyobjects) {
 
 6980     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
 
 6981     m->defaults = PyMem_Malloc(size);
 
 6983         return PyErr_NoMemory();
 
 6984     memset(m->defaults, 0, size);
 
 6985     m->defaults_pyobjects = pyobjects;
 
 6988 static CYTHON_INLINE 
void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
 
 6989     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
 
 6990     m->defaults_tuple = tuple;
 
 6993 static CYTHON_INLINE 
void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
 
 6994     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
 
 6995     m->defaults_kwdict = dict;
 
 6998 static CYTHON_INLINE 
void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
 
 6999     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
 
 7000     m->func_annotations = dict;
 
 7004 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
 
 7005                                            PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
 
 7008         PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
 
 7010             PyObject *pargs = PyTuple_Pack(2, name, bases);
 
 7011             if (unlikely(!pargs)) {
 
 7015             ns = PyObject_Call(prep, pargs, mkw);
 
 7019             if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
 
 7029     if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) 
goto bad;
 
 7030     if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) 
goto bad;
 
 7031     if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) 
goto bad;
 
 7037 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
 
 7038                                       PyObject *dict, PyObject *mkw,
 
 7039                                       int calculate_metaclass, 
int allow_py2_metaclass) {
 
 7040     PyObject *result, *margs;
 
 7041     PyObject *owned_metaclass = NULL;
 
 7042     if (allow_py2_metaclass) {
 
 7043         owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
 
 7044         if (owned_metaclass) {
 
 7045             metaclass = owned_metaclass;
 
 7046         } 
else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
 
 7052     if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
 
 7053         metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
 
 7054         Py_XDECREF(owned_metaclass);
 
 7055         if (unlikely(!metaclass))
 
 7057         owned_metaclass = metaclass;
 
 7059     margs = PyTuple_Pack(3, name, bases, dict);
 
 7060     if (unlikely(!margs)) {
 
 7063         result = PyObject_Call(metaclass, margs, mkw);
 
 7066     Py_XDECREF(owned_metaclass);
 
 7070 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, 
int level) {
 
 7071     PyObject *empty_list = 0;
 
 7072     PyObject *module = 0;
 
 7073     PyObject *global_dict = 0;
 
 7074     PyObject *empty_dict = 0;
 
 7076     #if PY_VERSION_HEX < 0x03030000 
 7077     PyObject *py_import;
 
 7078     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
 
 7085         empty_list = PyList_New(0);
 
 7090     global_dict = PyModule_GetDict(__pyx_m);
 
 7093     empty_dict = PyDict_New();
 
 7096     #if PY_VERSION_HEX >= 0x02050000 
 7098         #if PY_MAJOR_VERSION >= 3 
 7100             if (strchr(__Pyx_MODULE_NAME, 
'.')) {
 
 7101                 #if PY_VERSION_HEX < 0x03030000 
 7102                 PyObject *py_level = PyInt_FromLong(1);
 
 7105                 module = PyObject_CallFunctionObjArgs(py_import,
 
 7106                     name, global_dict, empty_dict, list, py_level, NULL);
 
 7107                 Py_DECREF(py_level);
 
 7109                 module = PyImport_ImportModuleLevelObject(
 
 7110                     name, global_dict, empty_dict, list, 1);
 
 7113                     if (!PyErr_ExceptionMatches(PyExc_ImportError))
 
 7122             #if PY_VERSION_HEX < 0x03030000 
 7123             PyObject *py_level = PyInt_FromLong(level);
 
 7126             module = PyObject_CallFunctionObjArgs(py_import,
 
 7127                 name, global_dict, empty_dict, list, py_level, NULL);
 
 7128             Py_DECREF(py_level);
 
 7130             module = PyImport_ImportModuleLevelObject(
 
 7131                 name, global_dict, empty_dict, list, level);
 
 7137         PyErr_SetString(PyExc_RuntimeError, 
"Relative import is not supported for Python <=2.4.");
 
 7140     module = PyObject_CallFunctionObjArgs(py_import,
 
 7141         name, global_dict, empty_dict, list, NULL);
 
 7144     #if PY_VERSION_HEX < 0x03030000 
 7145     Py_XDECREF(py_import);
 
 7147     Py_XDECREF(empty_list);
 
 7148     Py_XDECREF(empty_dict);
 
 7152 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func)             \ 
 7154         func_type value = func(x);                                        \ 
 7155         if (sizeof(target_type) < sizeof(func_type)) {                    \ 
 7156             if (unlikely(value != (func_type) (target_type) value)) {     \ 
 7157                 func_type zero = 0;                                       \ 
 7158                 PyErr_SetString(PyExc_OverflowError,                      \ 
 7159                     (is_unsigned && unlikely(value < zero)) ?             \ 
 7160                     "can't convert negative value to " #target_type :     \
 
 7161                     "value too large to convert to " #target_type);       \
 
 7162                 return (target_type) -1;                                  \
 
 7165         return (target_type) value;                                       \
 
 7168 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7169  #if CYTHON_USE_PYLONG_INTERNALS 
 7170   #include "longintrepr.h" 
 7173 static CYTHON_INLINE 
int __Pyx_PyInt_As_int(PyObject *x) {
 
 7174     const int neg_one = (int) -1, const_zero = 0;
 
 7175     const int is_unsigned = neg_one > const_zero;
 
 7176 #if PY_MAJOR_VERSION < 3 
 7177     if (likely(PyInt_Check(x))) {
 
 7178         if (
sizeof(
int) < 
sizeof(long)) {
 
 7179             __PYX_VERIFY_RETURN_INT(
int, 
long, PyInt_AS_LONG)
 
 7181             long val = PyInt_AS_LONG(x);
 
 7182             if (is_unsigned && unlikely(val < 0)) {
 
 7183                 PyErr_SetString(PyExc_OverflowError,
 
 7184                                 "can't convert negative value to int");
 
 7191     if (likely(PyLong_Check(x))) {
 
 7193 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7194  #if CYTHON_USE_PYLONG_INTERNALS 
 7195             if (
sizeof(digit) <= 
sizeof(
int)) {
 
 7196                 switch (Py_SIZE(x)) {
 
 7198                     case  1: 
return (
int) ((PyLongObject*)x)->ob_digit[0];
 
 7203             if (unlikely(Py_SIZE(x) < 0)) {
 
 7204                 PyErr_SetString(PyExc_OverflowError,
 
 7205                                 "can't convert negative value to int");
 
 7208             if (
sizeof(
int) <= 
sizeof(
unsigned long)) {
 
 7209                 __PYX_VERIFY_RETURN_INT(
int, 
unsigned long, PyLong_AsUnsignedLong)
 
 7210             } 
else if (
sizeof(
int) <= 
sizeof(
unsigned long long)) {
 
 7211                 __PYX_VERIFY_RETURN_INT(
int, 
unsigned long long, PyLong_AsUnsignedLongLong)
 
 7214 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7215  #if CYTHON_USE_PYLONG_INTERNALS 
 7216             if (
sizeof(digit) <= 
sizeof(
int)) {
 
 7217                 switch (Py_SIZE(x)) {
 
 7219                     case  1: 
return +(int) ((PyLongObject*)x)->ob_digit[0];
 
 7220                     case -1: 
return -(int) ((PyLongObject*)x)->ob_digit[0];
 
 7225             if (
sizeof(
int) <= 
sizeof(long)) {
 
 7226                 __PYX_VERIFY_RETURN_INT(
int, 
long, PyLong_AsLong)
 
 7227             } 
else if (
sizeof(
int) <= 
sizeof(
long long)) {
 
 7228                 __PYX_VERIFY_RETURN_INT(
int, 
long long, PyLong_AsLongLong)
 
 7232 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) 
 7233             PyErr_SetString(PyExc_RuntimeError,
 
 7234                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
 
 7237             PyObject *v = __Pyx_PyNumber_Int(x);
 
 7238  #if PY_MAJOR_VERSION < 3 
 7239             if (likely(v) && !PyLong_Check(v)) {
 
 7241                 v = PyNumber_Long(tmp);
 
 7246                 int one = 1; 
int is_little = (int)*(
unsigned char *)&one;
 
 7247                 unsigned char *bytes = (
unsigned char *)&val;
 
 7248                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
 
 7250                                               is_little, !is_unsigned);
 
 7260         PyObject *tmp = __Pyx_PyNumber_Int(x);
 
 7261         if (!tmp) 
return (
int) -1;
 
 7262         val = __Pyx_PyInt_As_int(tmp);
 
 7268 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7269  #if CYTHON_USE_PYLONG_INTERNALS 
 7270   #include "longintrepr.h" 
 7273 static CYTHON_INLINE 
long __Pyx_PyInt_As_long(PyObject *x) {
 
 7274     const long neg_one = (long) -1, const_zero = 0;
 
 7275     const int is_unsigned = neg_one > const_zero;
 
 7276 #if PY_MAJOR_VERSION < 3 
 7277     if (likely(PyInt_Check(x))) {
 
 7278         if (
sizeof(
long) < 
sizeof(long)) {
 
 7279             __PYX_VERIFY_RETURN_INT(
long, 
long, PyInt_AS_LONG)
 
 7281             long val = PyInt_AS_LONG(x);
 
 7282             if (is_unsigned && unlikely(val < 0)) {
 
 7283                 PyErr_SetString(PyExc_OverflowError,
 
 7284                                 "can't convert negative value to long");
 
 7291     if (likely(PyLong_Check(x))) {
 
 7293 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7294  #if CYTHON_USE_PYLONG_INTERNALS 
 7295             if (
sizeof(digit) <= 
sizeof(
long)) {
 
 7296                 switch (Py_SIZE(x)) {
 
 7298                     case  1: 
return (
long) ((PyLongObject*)x)->ob_digit[0];
 
 7303             if (unlikely(Py_SIZE(x) < 0)) {
 
 7304                 PyErr_SetString(PyExc_OverflowError,
 
 7305                                 "can't convert negative value to long");
 
 7308             if (
sizeof(
long) <= 
sizeof(
unsigned long)) {
 
 7309                 __PYX_VERIFY_RETURN_INT(
long, 
unsigned long, PyLong_AsUnsignedLong)
 
 7310             } 
else if (
sizeof(
long) <= 
sizeof(
unsigned long long)) {
 
 7311                 __PYX_VERIFY_RETURN_INT(
long, 
unsigned long long, PyLong_AsUnsignedLongLong)
 
 7314 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7315  #if CYTHON_USE_PYLONG_INTERNALS 
 7316             if (
sizeof(digit) <= 
sizeof(
long)) {
 
 7317                 switch (Py_SIZE(x)) {
 
 7319                     case  1: 
return +(long) ((PyLongObject*)x)->ob_digit[0];
 
 7320                     case -1: 
return -(long) ((PyLongObject*)x)->ob_digit[0];
 
 7325             if (
sizeof(
long) <= 
sizeof(long)) {
 
 7326                 __PYX_VERIFY_RETURN_INT(
long, 
long, PyLong_AsLong)
 
 7327             } 
else if (
sizeof(
long) <= 
sizeof(
long long)) {
 
 7328                 __PYX_VERIFY_RETURN_INT(
long, 
long long, PyLong_AsLongLong)
 
 7332 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) 
 7333             PyErr_SetString(PyExc_RuntimeError,
 
 7334                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
 
 7337             PyObject *v = __Pyx_PyNumber_Int(x);
 
 7338  #if PY_MAJOR_VERSION < 3 
 7339             if (likely(v) && !PyLong_Check(v)) {
 
 7341                 v = PyNumber_Long(tmp);
 
 7346                 int one = 1; 
int is_little = (int)*(
unsigned char *)&one;
 
 7347                 unsigned char *bytes = (
unsigned char *)&val;
 
 7348                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
 
 7350                                               is_little, !is_unsigned);
 
 7360         PyObject *tmp = __Pyx_PyNumber_Int(x);
 
 7361         if (!tmp) 
return (
long) -1;
 
 7362         val = __Pyx_PyInt_As_long(tmp);
 
 7368 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7369  #if CYTHON_USE_PYLONG_INTERNALS 
 7370   #include "longintrepr.h" 
 7373 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) {
 
 7374     const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = 0;
 
 7375     const int is_unsigned = neg_one > const_zero;
 
 7376 #if PY_MAJOR_VERSION < 3 
 7377     if (likely(PyInt_Check(x))) {
 
 7378         if (
sizeof(PY_LONG_LONG) < 
sizeof(long)) {
 
 7379             __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, 
long, PyInt_AS_LONG)
 
 7381             long val = PyInt_AS_LONG(x);
 
 7382             if (is_unsigned && unlikely(val < 0)) {
 
 7383                 PyErr_SetString(PyExc_OverflowError,
 
 7384                                 "can't convert negative value to PY_LONG_LONG");
 
 7385                 return (PY_LONG_LONG) -1;
 
 7387             return (PY_LONG_LONG) val;
 
 7391     if (likely(PyLong_Check(x))) {
 
 7393 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7394  #if CYTHON_USE_PYLONG_INTERNALS 
 7395             if (
sizeof(digit) <= 
sizeof(PY_LONG_LONG)) {
 
 7396                 switch (Py_SIZE(x)) {
 
 7398                     case  1: 
return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
 
 7403             if (unlikely(Py_SIZE(x) < 0)) {
 
 7404                 PyErr_SetString(PyExc_OverflowError,
 
 7405                                 "can't convert negative value to PY_LONG_LONG");
 
 7406                 return (PY_LONG_LONG) -1;
 
 7408             if (
sizeof(PY_LONG_LONG) <= 
sizeof(
unsigned long)) {
 
 7409                 __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, 
unsigned long, PyLong_AsUnsignedLong)
 
 7410             } 
else if (
sizeof(PY_LONG_LONG) <= 
sizeof(
unsigned long long)) {
 
 7411                 __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, 
unsigned long long, PyLong_AsUnsignedLongLong)
 
 7414 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7415  #if CYTHON_USE_PYLONG_INTERNALS 
 7416             if (
sizeof(digit) <= 
sizeof(PY_LONG_LONG)) {
 
 7417                 switch (Py_SIZE(x)) {
 
 7419                     case  1: 
return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
 
 7420                     case -1: 
return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
 
 7425             if (
sizeof(PY_LONG_LONG) <= 
sizeof(long)) {
 
 7426                 __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, 
long, PyLong_AsLong)
 
 7427             } 
else if (
sizeof(PY_LONG_LONG) <= 
sizeof(
long long)) {
 
 7428                 __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, 
long long, PyLong_AsLongLong)
 
 7432 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) 
 7433             PyErr_SetString(PyExc_RuntimeError,
 
 7434                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
 
 7437             PyObject *v = __Pyx_PyNumber_Int(x);
 
 7438  #if PY_MAJOR_VERSION < 3 
 7439             if (likely(v) && !PyLong_Check(v)) {
 
 7441                 v = PyNumber_Long(tmp);
 
 7446                 int one = 1; 
int is_little = (int)*(
unsigned char *)&one;
 
 7447                 unsigned char *bytes = (
unsigned char *)&val;
 
 7448                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
 
 7450                                               is_little, !is_unsigned);
 
 7456             return (PY_LONG_LONG) -1;
 
 7460         PyObject *tmp = __Pyx_PyNumber_Int(x);
 
 7461         if (!tmp) 
return (PY_LONG_LONG) -1;
 
 7462         val = __Pyx_PyInt_As_PY_LONG_LONG(tmp);
 
 7468 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value) {
 
 7469     const int neg_one = (int) -1, const_zero = 0;
 
 7470     const int is_unsigned = neg_one > const_zero;
 
 7472         if (
sizeof(
int) < 
sizeof(long)) {
 
 7473             return PyInt_FromLong((
long) value);
 
 7474         } 
else if (
sizeof(
int) <= 
sizeof(
unsigned long)) {
 
 7475             return PyLong_FromUnsignedLong((
unsigned long) value);
 
 7476         } 
else if (
sizeof(
int) <= 
sizeof(
unsigned long long)) {
 
 7477             return PyLong_FromUnsignedLongLong((
unsigned long long) value);
 
 7480         if (
sizeof(
int) <= 
sizeof(
long)) {
 
 7481             return PyInt_FromLong((
long) value);
 
 7482         } 
else if (
sizeof(
int) <= 
sizeof(
long long)) {
 
 7483             return PyLong_FromLongLong((
long long) value);
 
 7487         int one = 1; 
int little = (int)*(
unsigned char *)&one;
 
 7488         unsigned char *bytes = (
unsigned char *)&value;
 
 7489         return _PyLong_FromByteArray(bytes, 
sizeof(
int),
 
 7490                                      little, !is_unsigned);
 
 7494 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7495  #if CYTHON_USE_PYLONG_INTERNALS 
 7496   #include "longintrepr.h" 
 7499 static CYTHON_INLINE 
size_t __Pyx_PyInt_As_size_t(PyObject *x) {
 
 7500     const size_t neg_one = (size_t) -1, const_zero = 0;
 
 7501     const int is_unsigned = neg_one > const_zero;
 
 7502 #if PY_MAJOR_VERSION < 3 
 7503     if (likely(PyInt_Check(x))) {
 
 7504         if (
sizeof(
size_t) < 
sizeof(long)) {
 
 7505             __PYX_VERIFY_RETURN_INT(
size_t, 
long, PyInt_AS_LONG)
 
 7507             long val = PyInt_AS_LONG(x);
 
 7508             if (is_unsigned && unlikely(val < 0)) {
 
 7509                 PyErr_SetString(PyExc_OverflowError,
 
 7510                                 "can't convert negative value to size_t");
 
 7513             return (
size_t) val;
 
 7517     if (likely(PyLong_Check(x))) {
 
 7519 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7520  #if CYTHON_USE_PYLONG_INTERNALS 
 7521             if (
sizeof(digit) <= 
sizeof(
size_t)) {
 
 7522                 switch (Py_SIZE(x)) {
 
 7524                     case  1: 
return (
size_t) ((PyLongObject*)x)->ob_digit[0];
 
 7529             if (unlikely(Py_SIZE(x) < 0)) {
 
 7530                 PyErr_SetString(PyExc_OverflowError,
 
 7531                                 "can't convert negative value to size_t");
 
 7534             if (
sizeof(
size_t) <= 
sizeof(
unsigned long)) {
 
 7535                 __PYX_VERIFY_RETURN_INT(
size_t, 
unsigned long, PyLong_AsUnsignedLong)
 
 7536             } 
else if (
sizeof(
size_t) <= 
sizeof(
unsigned long long)) {
 
 7537                 __PYX_VERIFY_RETURN_INT(
size_t, 
unsigned long long, PyLong_AsUnsignedLongLong)
 
 7540 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7541  #if CYTHON_USE_PYLONG_INTERNALS 
 7542             if (
sizeof(digit) <= 
sizeof(
size_t)) {
 
 7543                 switch (Py_SIZE(x)) {
 
 7545                     case  1: 
return +(size_t) ((PyLongObject*)x)->ob_digit[0];
 
 7546                     case -1: 
return -(size_t) ((PyLongObject*)x)->ob_digit[0];
 
 7551             if (
sizeof(
size_t) <= 
sizeof(long)) {
 
 7552                 __PYX_VERIFY_RETURN_INT(
size_t, 
long, PyLong_AsLong)
 
 7553             } 
else if (
sizeof(
size_t) <= 
sizeof(
long long)) {
 
 7554                 __PYX_VERIFY_RETURN_INT(
size_t, 
long long, PyLong_AsLongLong)
 
 7558 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) 
 7559             PyErr_SetString(PyExc_RuntimeError,
 
 7560                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
 
 7563             PyObject *v = __Pyx_PyNumber_Int(x);
 
 7564  #if PY_MAJOR_VERSION < 3 
 7565             if (likely(v) && !PyLong_Check(v)) {
 
 7567                 v = PyNumber_Long(tmp);
 
 7572                 int one = 1; 
int is_little = (int)*(
unsigned char *)&one;
 
 7573                 unsigned char *bytes = (
unsigned char *)&val;
 
 7574                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
 
 7576                                               is_little, !is_unsigned);
 
 7586         PyObject *tmp = __Pyx_PyNumber_Int(x);
 
 7587         if (!tmp) 
return (
size_t) -1;
 
 7588         val = __Pyx_PyInt_As_size_t(tmp);
 
 7594 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value) {
 
 7595     const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = 0;
 
 7596     const int is_unsigned = neg_one > const_zero;
 
 7598         if (
sizeof(PY_LONG_LONG) < 
sizeof(long)) {
 
 7599             return PyInt_FromLong((
long) value);
 
 7600         } 
else if (
sizeof(PY_LONG_LONG) <= 
sizeof(
unsigned long)) {
 
 7601             return PyLong_FromUnsignedLong((
unsigned long) value);
 
 7602         } 
else if (
sizeof(PY_LONG_LONG) <= 
sizeof(
unsigned long long)) {
 
 7603             return PyLong_FromUnsignedLongLong((
unsigned long long) value);
 
 7606         if (
sizeof(PY_LONG_LONG) <= 
sizeof(
long)) {
 
 7607             return PyInt_FromLong((
long) value);
 
 7608         } 
else if (
sizeof(PY_LONG_LONG) <= 
sizeof(
long long)) {
 
 7609             return PyLong_FromLongLong((
long long) value);
 
 7613         int one = 1; 
int little = (int)*(
unsigned char *)&one;
 
 7614         unsigned char *bytes = (
unsigned char *)&value;
 
 7615         return _PyLong_FromByteArray(bytes, 
sizeof(PY_LONG_LONG),
 
 7616                                      little, !is_unsigned);
 
 7620 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7621  #if CYTHON_USE_PYLONG_INTERNALS 
 7622   #include "longintrepr.h" 
 7625 static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
 
 7626     const uint64_t neg_one = (uint64_t) -1, const_zero = 0;
 
 7627     const int is_unsigned = neg_one > const_zero;
 
 7628 #if PY_MAJOR_VERSION < 3 
 7629     if (likely(PyInt_Check(x))) {
 
 7630         if (
sizeof(uint64_t) < 
sizeof(long)) {
 
 7631             __PYX_VERIFY_RETURN_INT(uint64_t, 
long, PyInt_AS_LONG)
 
 7633             long val = PyInt_AS_LONG(x);
 
 7634             if (is_unsigned && unlikely(val < 0)) {
 
 7635                 PyErr_SetString(PyExc_OverflowError,
 
 7636                                 "can't convert negative value to uint64_t");
 
 7637                 return (uint64_t) -1;
 
 7639             return (uint64_t) val;
 
 7643     if (likely(PyLong_Check(x))) {
 
 7645 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7646  #if CYTHON_USE_PYLONG_INTERNALS 
 7647             if (
sizeof(digit) <= 
sizeof(uint64_t)) {
 
 7648                 switch (Py_SIZE(x)) {
 
 7650                     case  1: 
return (uint64_t) ((PyLongObject*)x)->ob_digit[0];
 
 7655             if (unlikely(Py_SIZE(x) < 0)) {
 
 7656                 PyErr_SetString(PyExc_OverflowError,
 
 7657                                 "can't convert negative value to uint64_t");
 
 7658                 return (uint64_t) -1;
 
 7660             if (
sizeof(uint64_t) <= 
sizeof(
unsigned long)) {
 
 7661                 __PYX_VERIFY_RETURN_INT(uint64_t, 
unsigned long, PyLong_AsUnsignedLong)
 
 7662             } 
else if (
sizeof(uint64_t) <= 
sizeof(
unsigned long long)) {
 
 7663                 __PYX_VERIFY_RETURN_INT(uint64_t, 
unsigned long long, PyLong_AsUnsignedLongLong)
 
 7666 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 7667  #if CYTHON_USE_PYLONG_INTERNALS 
 7668             if (
sizeof(digit) <= 
sizeof(uint64_t)) {
 
 7669                 switch (Py_SIZE(x)) {
 
 7671                     case  1: 
return +(uint64_t) ((PyLongObject*)x)->ob_digit[0];
 
 7672                     case -1: 
return -(uint64_t) ((PyLongObject*)x)->ob_digit[0];
 
 7677             if (
sizeof(uint64_t) <= 
sizeof(long)) {
 
 7678                 __PYX_VERIFY_RETURN_INT(uint64_t, 
long, PyLong_AsLong)
 
 7679             } 
else if (
sizeof(uint64_t) <= 
sizeof(
long long)) {
 
 7680                 __PYX_VERIFY_RETURN_INT(uint64_t, 
long long, PyLong_AsLongLong)
 
 7684 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) 
 7685             PyErr_SetString(PyExc_RuntimeError,
 
 7686                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
 
 7689             PyObject *v = __Pyx_PyNumber_Int(x);
 
 7690  #if PY_MAJOR_VERSION < 3 
 7691             if (likely(v) && !PyLong_Check(v)) {
 
 7693                 v = PyNumber_Long(tmp);
 
 7698                 int one = 1; 
int is_little = (int)*(
unsigned char *)&one;
 
 7699                 unsigned char *bytes = (
unsigned char *)&val;
 
 7700                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
 
 7702                                               is_little, !is_unsigned);
 
 7708             return (uint64_t) -1;
 
 7712         PyObject *tmp = __Pyx_PyNumber_Int(x);
 
 7713         if (!tmp) 
return (uint64_t) -1;
 
 7714         val = __Pyx_PyInt_As_uint64_t(tmp);
 
 7720 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value) {
 
 7721     const long neg_one = (long) -1, const_zero = 0;
 
 7722     const int is_unsigned = neg_one > const_zero;
 
 7724         if (
sizeof(
long) < 
sizeof(long)) {
 
 7725             return PyInt_FromLong((
long) value);
 
 7726         } 
else if (
sizeof(
long) <= 
sizeof(
unsigned long)) {
 
 7727             return PyLong_FromUnsignedLong((
unsigned long) value);
 
 7728         } 
else if (
sizeof(
long) <= 
sizeof(
unsigned long long)) {
 
 7729             return PyLong_FromUnsignedLongLong((
unsigned long long) value);
 
 7732         if (
sizeof(
long) <= 
sizeof(
long)) {
 
 7733             return PyInt_FromLong((
long) value);
 
 7734         } 
else if (
sizeof(
long) <= 
sizeof(
long long)) {
 
 7735             return PyLong_FromLongLong((
long long) value);
 
 7739         int one = 1; 
int little = (int)*(
unsigned char *)&one;
 
 7740         unsigned char *bytes = (
unsigned char *)&value;
 
 7741         return _PyLong_FromByteArray(bytes, 
sizeof(
long),
 
 7742                                      little, !is_unsigned);
 
 7746 static int __Pyx_check_binary_version(
void) {
 
 7747     char ctversion[4], rtversion[4];
 
 7748     PyOS_snprintf(ctversion, 4, 
"%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
 
 7749     PyOS_snprintf(rtversion, 4, 
"%s", Py_GetVersion());
 
 7750     if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
 
 7752         PyOS_snprintf(message, 
sizeof(message),
 
 7753                       "compiletime version %s of module '%.100s' " 
 7754                       "does not match runtime version %s",
 
 7755                       ctversion, __Pyx_MODULE_NAME, rtversion);
 
 7756         #if PY_VERSION_HEX < 0x02050000 
 7757         return PyErr_Warn(NULL, message);
 
 7759         return PyErr_WarnEx(NULL, message, 1);
 
 7765 #ifndef __PYX_HAVE_RT_ImportModule 
 7766 #define __PYX_HAVE_RT_ImportModule 
 7767 static PyObject *__Pyx_ImportModule(
const char *name) {
 
 7768     PyObject *py_name = 0;
 
 7769     PyObject *py_module = 0;
 
 7770     py_name = __Pyx_PyIdentifier_FromString(name);
 
 7773     py_module = PyImport_Import(py_name);
 
 7777     Py_XDECREF(py_name);
 
 7782 #ifndef __PYX_HAVE_RT_ImportType 
 7783 #define __PYX_HAVE_RT_ImportType 
 7784 static PyTypeObject *__Pyx_ImportType(
const char *module_name, 
const char *class_name,
 
 7785     size_t size, 
int strict)
 
 7787     PyObject *py_module = 0;
 
 7788     PyObject *result = 0;
 
 7789     PyObject *py_name = 0;
 
 7791     Py_ssize_t basicsize;
 
 7792 #ifdef Py_LIMITED_API 
 7793     PyObject *py_basicsize;
 
 7795     py_module = __Pyx_ImportModule(module_name);
 
 7798     py_name = __Pyx_PyIdentifier_FromString(class_name);
 
 7801     result = PyObject_GetAttr(py_module, py_name);
 
 7804     Py_DECREF(py_module);
 
 7808     if (!PyType_Check(result)) {
 
 7809         PyErr_Format(PyExc_TypeError,
 
 7810             "%.200s.%.200s is not a type object",
 
 7811             module_name, class_name);
 
 7814 #ifndef Py_LIMITED_API 
 7815     basicsize = ((PyTypeObject *)result)->tp_basicsize;
 
 7817     py_basicsize = PyObject_GetAttrString(result, 
"__basicsize__");
 
 7820     basicsize = PyLong_AsSsize_t(py_basicsize);
 
 7821     Py_DECREF(py_basicsize);
 
 7823     if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
 
 7826     if (!strict && (
size_t)basicsize > size) {
 
 7827         PyOS_snprintf(warning, 
sizeof(warning),
 
 7828             "%s.%s size changed, may indicate binary incompatibility",
 
 7829             module_name, class_name);
 
 7830         #if PY_VERSION_HEX < 0x02050000 
 7831         if (PyErr_Warn(NULL, warning) < 0) 
goto bad;
 
 7833         if (PyErr_WarnEx(NULL, warning, 0) < 0) 
goto bad;
 
 7836     else if ((
size_t)basicsize != size) {
 
 7837         PyErr_Format(PyExc_ValueError,
 
 7838             "%.200s.%.200s has the wrong size, try recompiling",
 
 7839             module_name, class_name);
 
 7842     return (PyTypeObject *)result;
 
 7844     Py_XDECREF(py_module);
 
 7850 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, 
int count, 
int code_line) {
 
 7851     int start = 0, mid = 0, end = count - 1;
 
 7852     if (end >= 0 && code_line > entries[end].code_line) {
 
 7855     while (start < end) {
 
 7856         mid = (start + end) / 2;
 
 7857         if (code_line < entries[mid].code_line) {
 
 7859         } 
else if (code_line > entries[mid].code_line) {
 
 7865     if (code_line <= entries[mid].code_line) {
 
 7871 static PyCodeObject *__pyx_find_code_object(
int code_line) {
 
 7872     PyCodeObject* code_object;
 
 7874     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
 
 7877     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
 
 7878     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
 
 7881     code_object = __pyx_code_cache.entries[pos].code_object;
 
 7882     Py_INCREF(code_object);
 
 7885 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object) {
 
 7887     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
 
 7888     if (unlikely(!code_line)) {
 
 7891     if (unlikely(!entries)) {
 
 7892         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*
sizeof(__Pyx_CodeObjectCacheEntry));
 
 7893         if (likely(entries)) {
 
 7894             __pyx_code_cache.entries = entries;
 
 7895             __pyx_code_cache.max_count = 64;
 
 7896             __pyx_code_cache.count = 1;
 
 7897             entries[0].code_line = code_line;
 
 7898             entries[0].code_object = code_object;
 
 7899             Py_INCREF(code_object);
 
 7903     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
 
 7904     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
 
 7905         PyCodeObject* tmp = entries[pos].code_object;
 
 7906         entries[pos].code_object = code_object;
 
 7910     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
 
 7911         int new_max = __pyx_code_cache.max_count + 64;
 
 7912         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
 
 7913             __pyx_code_cache.entries, (
size_t)new_max*
sizeof(__Pyx_CodeObjectCacheEntry));
 
 7914         if (unlikely(!entries)) {
 
 7917         __pyx_code_cache.entries = entries;
 
 7918         __pyx_code_cache.max_count = new_max;
 
 7920     for (i=__pyx_code_cache.count; i>pos; i--) {
 
 7921         entries[i] = entries[i-1];
 
 7923     entries[pos].code_line = code_line;
 
 7924     entries[pos].code_object = code_object;
 
 7925     __pyx_code_cache.count++;
 
 7926     Py_INCREF(code_object);
 
 7929 #include "compile.h" 
 7930 #include "frameobject.h" 
 7931 #include "traceback.h" 
 7932 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
 
 7933             const char *funcname, 
int c_line,
 
 7934             int py_line, 
const char *filename) {
 
 7935     PyCodeObject *py_code = 0;
 
 7936     PyObject *py_srcfile = 0;
 
 7937     PyObject *py_funcname = 0;
 
 7938     #if PY_MAJOR_VERSION < 3 
 7939     py_srcfile = PyString_FromString(filename);
 
 7941     py_srcfile = PyUnicode_FromString(filename);
 
 7943     if (!py_srcfile) 
goto bad;
 
 7945         #if PY_MAJOR_VERSION < 3 
 7946         py_funcname = PyString_FromFormat( 
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
 
 7948         py_funcname = PyUnicode_FromFormat( 
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
 
 7952         #if PY_MAJOR_VERSION < 3 
 7953         py_funcname = PyString_FromString(funcname);
 
 7955         py_funcname = PyUnicode_FromString(funcname);
 
 7958     if (!py_funcname) 
goto bad;
 
 7959     py_code = __Pyx_PyCode_New(
 
 7976     Py_DECREF(py_srcfile);
 
 7977     Py_DECREF(py_funcname);
 
 7980     Py_XDECREF(py_srcfile);
 
 7981     Py_XDECREF(py_funcname);
 
 7984 static void __Pyx_AddTraceback(
const char *funcname, 
int c_line,
 
 7985                                int py_line, 
const char *filename) {
 
 7986     PyCodeObject *py_code = 0;
 
 7987     PyObject *py_globals = 0;
 
 7988     PyFrameObject *py_frame = 0;
 
 7989     py_code = __pyx_find_code_object(c_line ? c_line : py_line);
 
 7991         py_code = __Pyx_CreateCodeObjectForTraceback(
 
 7992             funcname, c_line, py_line, filename);
 
 7993         if (!py_code) 
goto bad;
 
 7994         __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
 
 7996     py_globals = PyModule_GetDict(__pyx_m);
 
 7997     if (!py_globals) 
goto bad;
 
 7998     py_frame = PyFrame_New(
 
 7999         PyThreadState_GET(), 
 
 8004     if (!py_frame) 
goto bad;
 
 8005     py_frame->f_lineno = py_line;
 
 8006     PyTraceBack_Here(py_frame);
 
 8008     Py_XDECREF(py_code);
 
 8009     Py_XDECREF(py_frame);
 
 8012 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
 
 8014         #if PY_MAJOR_VERSION < 3 
 8015         if (t->is_unicode) {
 
 8016             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
 
 8017         } 
else if (t->intern) {
 
 8018             *t->p = PyString_InternFromString(t->s);
 
 8020             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
 
 8023         if (t->is_unicode | t->is_str) {
 
 8025                 *t->p = PyUnicode_InternFromString(t->s);
 
 8026             } 
else if (t->encoding) {
 
 8027                 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
 
 8029                 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
 
 8032             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
 
 8042 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char* c_str) {
 
 8043     return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
 
 8045 static CYTHON_INLINE 
char* __Pyx_PyObject_AsString(PyObject* o) {
 
 8047     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
 
 8049 static CYTHON_INLINE 
char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
 
 8050 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 
 8052 #
if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
 
 8053             __Pyx_sys_getdefaultencoding_not_ascii &&
 
 8055             PyUnicode_Check(o)) {
 
 8056 #if PY_VERSION_HEX < 0x03030000 
 8058         PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
 
 8059         if (!defenc) 
return NULL;
 
 8060         defenc_c = PyBytes_AS_STRING(defenc);
 
 8061 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 
 8063             char* end = defenc_c + PyBytes_GET_SIZE(defenc);
 
 8065             for (c = defenc_c; c < end; c++) {
 
 8066                 if ((
unsigned char) (*c) >= 128) {
 
 8067                     PyUnicode_AsASCIIString(o);
 
 8073         *length = PyBytes_GET_SIZE(defenc);
 
 8076         if (PyUnicode_READY(o) == -1) 
return NULL;
 
 8077 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 
 8078         if (PyUnicode_IS_ASCII(o)) {
 
 8079             *length = PyUnicode_GET_LENGTH(o);
 
 8080             return PyUnicode_AsUTF8(o);
 
 8082             PyUnicode_AsASCIIString(o);
 
 8086         return PyUnicode_AsUTF8AndSize(o, length);
 
 8091 #if !CYTHON_COMPILING_IN_PYPY 
 8092 #if PY_VERSION_HEX >= 0x02060000 
 8093     if (PyByteArray_Check(o)) {
 
 8094         *length = PyByteArray_GET_SIZE(o);
 
 8095         return PyByteArray_AS_STRING(o);
 
 8101         int r = PyBytes_AsStringAndSize(o, &result, length);
 
 8102         if (unlikely(r < 0)) {
 
 8109 static CYTHON_INLINE 
int __Pyx_PyObject_IsTrue(PyObject* x) {
 
 8110    int is_true = x == Py_True;
 
 8111    if (is_true | (x == Py_False) | (x == Py_None)) 
return is_true;
 
 8112    else return PyObject_IsTrue(x);
 
 8114 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
 
 8116   const char *name = NULL;
 
 8117   PyObject *res = NULL;
 
 8118 #if PY_MAJOR_VERSION < 3 
 8119   if (PyInt_Check(x) || PyLong_Check(x))
 
 8121   if (PyLong_Check(x))
 
 8123     return Py_INCREF(x), x;
 
 8124   m = Py_TYPE(x)->tp_as_number;
 
 8125 #if PY_MAJOR_VERSION < 3 
 8126   if (m && m->nb_int) {
 
 8128     res = PyNumber_Int(x);
 
 8130   else if (m && m->nb_long) {
 
 8132     res = PyNumber_Long(x);
 
 8135   if (m && m->nb_int) {
 
 8137     res = PyNumber_Long(x);
 
 8141 #if PY_MAJOR_VERSION < 3 
 8142     if (!PyInt_Check(res) && !PyLong_Check(res)) {
 
 8144     if (!PyLong_Check(res)) {
 
 8146       PyErr_Format(PyExc_TypeError,
 
 8147                    "__%.4s__ returned non-%.4s (type %.200s)",
 
 8148                    name, name, Py_TYPE(res)->tp_name);
 
 8153   else if (!PyErr_Occurred()) {
 
 8154     PyErr_SetString(PyExc_TypeError,
 
 8155                     "an integer is required");
 
 8159 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 8160  #if CYTHON_USE_PYLONG_INTERNALS 
 8161   #include "longintrepr.h" 
 8164 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
 
 8167 #if PY_MAJOR_VERSION < 3 
 8168   if (likely(PyInt_CheckExact(b)))
 
 8169       return PyInt_AS_LONG(b);
 
 8171   if (likely(PyLong_CheckExact(b))) {
 
 8172     #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 
 8173      #if CYTHON_USE_PYLONG_INTERNALS 
 8174        switch (Py_SIZE(b)) {
 
 8175        case -1: 
return -(sdigit)((PyLongObject*)b)->ob_digit[0];
 
 8177        case  1: 
return ((PyLongObject*)b)->ob_digit[0];
 
 8181   #if PY_VERSION_HEX < 0x02060000 
 8182     return PyInt_AsSsize_t(b);
 
 8184     return PyLong_AsSsize_t(b);
 
 8187   x = PyNumber_Index(b);
 
 8189   ival = PyInt_AsSsize_t(x);
 
 8193 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t ival) {
 
 8194 #if PY_VERSION_HEX < 0x02050000 
 8195    if (ival <= LONG_MAX)
 
 8196        return PyInt_FromLong((
long)ival);
 
 8198        unsigned char *bytes = (
unsigned char *) &ival;
 
 8199        int one = 1; 
int little = (int)*(
unsigned char*)&one;
 
 8200        return _PyLong_FromByteArray(bytes, 
sizeof(
size_t), little, 0);
 
 8203    return PyInt_FromSize_t(ival);
 
size_t sion_fwrite_key(const void *data, uint64_t key, size_t size, size_t nitems, int sid)
Writes data for key.
size_t sion_fread_key(void *data, uint64_t key, size_t size, size_t nitems, int sid)
Read data for key.
size_t sion_fread(void *data, size_t size, size_t nitems, int sid)
Read data from sion file.
size_t sion_fwrite(const void *data, size_t size, size_t nitems, int sid)
Write data to sion file.
sion_int64 sion_bytes_avail_in_chunk(int sid)
Function that returns the number of bytes available in the current chunk.
int sion_paropen_mpi(const char *fname, const char *file_mode, int *numFiles, MPI_Comm gComm, const MPI_Comm *lComm, sion_int64 *chunksize, sion_int32 *fsblksize, int *globalrank, FILE **fileptr, char **newfname)
Open a sion file using MPI.
int sion_parclose_mpi(int sid)
Close a sion file using MPI.
int sion_open(char *fname, const char *file_mode, int *ntasks, int *nfiles, sion_int64 **chunksizes, sion_int32 *fsblksize, int **globalranks, FILE **fileptr)
Open a sion file in serial mode.
int sion_close(int sid)
Close a sion file.